Templatizing a project in Visual Studio - c#

I have created a windows mobile application in Visual Studio. I want to templatize this project so that one can open this as a template as opposed to a project.
Is this possible in Visual Studio? I read that there is something called as "VSX (Visual Studio Extension)" which may achieve this. I have Visual Studio Ultimate installed in my system and was trying to install the VS2010 SDK. But its not getting installed telling that i dont have MS Visual Studio 2010 which I apparently do.
Am I going in the right direction? If not what would be the correct way to go ?

Yes it is possible like this: File > Export Template than click next :) It will save your code too

This is what I was looking for and it came really handy too.
Export Template Wizard
This exports a project directly as VSIX extension using a wizard.

I would recommend using the TemplateBuilder NuGet package inside of either a VSIX Project or a Visual Studio package. I've created a 6 minute video showing you how you can: Create a VSIX containing a project template, and then editing the template. Checkit out at https://www.youtube.com/watch?v=z33jOo75CH4.
FYI TemplateBuilder is open source at https://github.com/ligershark/template-builder. If you've heard of SideWaffle it relies on TemplateBuilder.

Related

How can i use an SDK in Visual studio with c#?

Recently I approaced C# and I've tried to see some projects, but I still don't understand how exactly I can use an SDK. Is it a ready to go project? When i download it I just need to modify some items in the SDK to create any kind of project or do i need to create a new file and somehow use the SDK? How can I use it?
To install the Visual Studio SDK after completing your Visual Studio installation, rerun the Visual Studio installer and select the Visual Studio extension development workload.

Is it possible to work on a ASP.NET application on Visual Studio 2015 and VS Code? [duplicate]

How do I open I a Visual Studio Code folder in Visual Studio 2015?
If I open it as a "Web Site", it tries to treat the node_modules directory as part of the project's normal JavaScript files and hits an error when the path exceed the maximum path length.
But I can't open it as any other project type unless I first create a project of that type and then move all the VS Code files into that folder.
Should I be trying to open it as a web site?
Or should I create a new project and then copy the files + folders into it?
Is there any advantage to having it as a project?
If I do create a project, it makes it difficult to work together with someone who is just using VS Code?
And if I use a project, which project type should I select?
Finally folder view has arrived in VS 2017 :)
You can find more details in here.
Currently there is no way to open a folder directly with Visual Studio.
Why? Because Visual Studio and Visual Studio Code only shared their name, not the idea behind it. To extend Jenny O'Reilly answer:
Visual Studio Code is a folder oriented editor
This means VSC has the same Point-of-View to your Project as the File Explorer.
Visual Studio (not Code) is a solution oriented integrated development environment (short IDE)
Instead every Project in Visual Studio needs a *.sln Solution-File as Root Component. From this point Visual Studio looks at your Project. An example would, if you copy File in your Project Folder, they wouldn't be recognized from Visual Studio. You have to add them first to your sln File, to see them. It also allows the developer to combine multiple projects (*.csproj,..) into one single Solution to build.
This means the idea behind these two editors is completely different.
Visual Studio (not code) Project-types for Web
There are Node.js Tools for Visual Studio
This will provide Node.js built-in project templates
Visual Studio 2015 comes with TypeScript templates
Workaround 1
A workaround would be a Blank Solution in which you set up your Visual Studio Code Project.
Workaround 2
Another trick would be the answer to this question. You can open your Project Folder as a Website Project.
File -> Open Website -> File System and choose the folder
Update
As you mentioned, there will be errors because Visual Studio tries to build the solutions. For the next few readers of this response, the work around for this (as John Pankowicz writes in the comment) is:
Right-click Web Site in Solution Explorer -> Property Pages -> Build -> Uncheck "Build Web Site as part of solution"
Update 2
(Thanks to JC1001 for this update)
The next version of Visual Studio (Visual Studio "15") will support opening a folder. This is mentioned in the Visual Studio Blog.
Also like in Visual Studio Code, there will be a prompt command for opening Folders. Right now you can use this in the preview version:
devenv /command “file.openfolder FOLDER_PATH”
In the future you will be able to use:
devenv FOLDER_PATH
Opinion
Personally I wouldn't recommend Visual Studio (not code) for HTML/Website projects without server-side-development, because I don't see any features. Even the intellisense suggests to me sometimes bad HTML Code (it's not the IDE's fault).
After all web projects are still text files. You can easily control group projects like this with Version Control. Visual Studio Code even provides an integrated Git support.
Visual Studio Code does not create "project files" that you can open in Visual Studio 2015. Basically, when you open up a Node website in Visual Studio, you need to re-create the folder structure in VS2015 and create a "project file".
I haven't seen any better ways of doing this, but will be happy when we can open a folder just as easilly as we can with VSCode
I'm sure it's not the best way but..
Open an existing .sln with notepad, change the names, save as [name of your project].sln.
Open with Visual Studio.

How do I handle an "incompatible" project in an opensource C# solution (digiCamControl)?

I am new to C# and have been trying to build digiCamControl on Visual Express 2013. The project CameraControl.Service is displayed as "incompatible" when building the solution. All other modules get added to the project without any problem.
1) Can you suggest why I could be facing this problem?
2) Can you suggest a fix for the problem?
Here is a link to the particular project inside digiCamControl, which is causing the "incompatiblity" error - https://github.com/dukus/digiCamControl/blob/master/CameraControl.Service/CameraControl.Service.csproj
3) Looking into this file, its a visual studio 2005 project (though opening it on some versions of Visual Express C# 2010, says that "you need a newer version" ?
< ProductVersion > 8.0.50727 < /ProductVersion >
(the id here is of visual studio 2005)
4) Do I need to migrate the project into 2013?
I want to use devenv.exe /upgrate to migrate the project - but it is not available on my Visual Studio C# 2013 (Community download) OR I cant find it.
I am downloading Ultimate Version to see if its available there.
Some other things, this is a WCF solution (if that helps).
Thanks in advance. ~ Naval
I was able to open the project and build it successfully with the Visual Studio Ultimate 2013.
Note: building successfully required some config changes, but those are more specific to the particular project (such as enabling unsafe operations).

Visual Studio Extensibility Package 2010 and 2012. Is there a way to have one package for both?

A while ago I created a Visual Studio Package/Add-In for Visual Studio 2010 (for those curious: http://visualstudiogallery.msdn.microsoft.com/ea23f9a7-a942-45b2-87e6-5df6ff0444ff). If I try to download that and install it in Visual Studio 2012, it doesn't work, I get a version error.
So my first thought was to see what happens if I try to port it to 2012. I downloaded and installed the VS2012 RC SDK, and basically recreated the whole thing in a separate solution and it all works. What I noticed was that many of the assemblies I had to reference (Microsoft.VisualStudio.*) were now version 11 as opposed to version 10 (for obvious reasons). After copying and pasting all the code over, I got it to work correctly in Visual Studio 2012.
My question now is this: Is it possible to have one .vsix file for multiple versions of Visual Studio (I'm guessing no.) If not, what's the correct approach to take as far as uploading the different versions? Can I upload two versions of a .vsix? Will the Add-In manager in visual studio pick the correct one automatically? Do I need to create a new package e.g. "Visual Pastie 2012"? Just looking for some guidance.
Rename the VSIX package to give it a ZIP extension and open it up. You'll find a file called extension.vsixmanifest. Inside this XML file you'll find an element called SupportedProducts which should look like the following to work in VS2012.
<SupportedProducts>
<VisualStudio Version="11.0">
<Edition>Pro</Edition>
</VisualStudio>
</SupportedProducts>
HTH

Can't add Visual C++ template project in Visual Studio Express

Don't know if this is related to the fact that I'm using Visual Studio 2010 Express, but when trying the first step in the link below I can't find the template Visual C++. I tried to download Visual C++ 2010 Express but still no luck.
Does anyone have a work around for this?
http://msdn.microsoft.com/en-us/library/ff967550(v=VS.92).aspx
EDIT:
I have now tried to create this DLL in Visual C++ 2010 Express instead. When following the guide from the link above I get stuck when I should add resource to the project (Step 2 under 'Create the Language-Neutral Resource Strings for Your Application'). The menu item is greyed out/disabled.
You will need the C++ edition of VS Express to create this Win32 Resource DLL. I assume that that is possible.
And then add the Project (might work) or the resulting file (should work) to your Phone project.
as far as I know you cannot create or build a native C/C++ project in Visual Studio Express. As I understand it, the Visual Studio Express is similar to a demo version that only allows you to create projects that use the .NET framework.
To create and build native C/C++ projects you need the retail Visual Studio Professional.

Categories

Resources