Ok, i already know how to create a new project template using export template feature from visual studio 2010. Now, what I'd like to know is how can I create an item or add a reference to an dll dynamically based on user selected option in wizard interface.
I know that is possible to use conditional and loops within visual studio project template, but how can I change the output project?
Related
Is there any simple way to determine Project Template (the one developer picked initially) of an existing project? I am using Visual Studion Community 2022
I am making a custom Visual Studio project template for test automation and want to make it available for download through visual studio to my team to avoid having to manually hand the .zip file around or store it in a file-share. Is there a way to do this, perhaps in a manner similar to how we can add packages to the nuget feed to make them available to our team/other teams?
We are using a commercial software that has its own scripting language with which you can customize the product. It is very tedious to write code in it without any help from an IDE and it has its own compiler.
Is it possible to use Visual Studio and create an environment for me to write scripts in this language and get the help of intellisense and syntax highlightning and other good things you find in an IDE? Ideally I would like to bind a button in VS to launch the external compiler and compile the code so I don't have to switch windows all the time as well.
If this is possible is it a very hard thing to accomplish?
Yes, this is certainly possible. You need to create a Visual Studio Shell add-in with custom language services and text editors. You need to install the appropriate Visual Studio SDK and then you'd continue to:
Create a custom Editor and/or designer
Add a language service
Add Project and Item templates
You're allowed to ship Visual Studio Isolated Shell with your application (license required and there are some limitations) so that your users don't need to have Visual Studio Professional installed.
There are a number of open-source projects that provide a custom editor, language services etc in Visual Studio, these could provide a nice place to research how things are done, next to teh Visual Studio SDK documentation:
PyTools, which is a Visual Studio editor for IronPython
Phalanger, which contains a Visual Studio editor for PHP
PoShTools, a Visual Studio service for PowerShell editing right inside Visual Studio
You'll probably want to dig into MsBuild as well, since Visual Studio will expect you to create a project file if you want to edit a collection of files and compile them. MsBuild could in turn call your own compiler, like it calls csc to compile C# code for example.
Creating Project Types
In Visual Studio 2010, I have a CLR C++ console project that I would like to change into a Forms project, so that I can add a form and use the designer and whatnot. Is there a good way to do this?
Compare the old project templates then make necessary changes like adding references to winforms and changing the entry point function from winmain back to main.
See http://jiangsheng.net/2012/12/17/how-to-migrating-a-clr-console-visual-c-project-to-windows-forms/ for details. This article is written for 2012 but should work in 2010.
If you are programming in C# in Visual Studio and type in "prop" and hit enter, the IDE generates a property. Eclipse also has this feature and the user can define custom commands that expands into custom code. Is this possible in Visual Studio?
Thanks to leppie's comment I managed to find the solution on my own: http://msdn.microsoft.com/en-us/library/ms165392(v=vs.80).aspx