How to create "Multi Project Template With Custom Wizard" in Visual Studio 2017 - visual-studio-2017

I'm looking for help on making a multi project template (i.e. a deploy-able solution that contains multiple projects) with a custom wizard (to enable custom parameters to be entered).
I've followed "How to: Create Multi-Project Templates" to make the multi project template. This is working.
I've followed "How to: Use Wizards with Project Templates" to make my wizard in my VSIX files. This is working.
However, I can't get them to work together. I can either deploy my multi project template without a wizard OR I can get all of my individual project templates to show in the project gallery, via my VSIX file, with a working custom wizard.
Any ideas on how to combine the two methods?

I was able to adopt an answer from this blog.
The key is to package all of your exported projects (which come in ZIP which you have to extract) and your root .vstemplate file into a ZIP. This ZIP then needs to be an imported project template in your VSIX project.
Lastly, your wizard needs to be its own separate project you can reference in any of your individual project templates or in your VSIX. I had my wizard being created in my VSIX which just didn't seem to work.

As stated by Dan, you need to have your multi-project templates in a zip file.
However, you do not need to have the wizard code in a separate project, you can have it all in your VSIX project.
I your VSIX project, to add a reference to your .zip file, open your source.extension.vsixmanifest designer -> Assets -> New -> Select type Project Template and Source 'File on filesystem' and select your zip file.
Make sure to also add your VSIX project as Assembly if you haven't already: New -> Select type Assembly and Source 'a project in current solution' and select your VSIX project. (This is probably why it didn't work for Dan)
In your multi-template.vstemplate file you need to add a reference to the VSIX dll as described in "How to: Use Wizards with Project Templates" using <WizardExtension>
In addition you can also add a <CustomParameters> section inside <TemplateContent> if you want to set up default custom parameter values. See here for more info: "The registration elements for customizing the template wizard"
Example:
<CustomParameters>
<CustomParameter Name="$mycustomparameter1$" Value="value1"/>
<CustomParameter Name="$mycustomparameter2$" Value="value2"/>
</CustomParameters>

Related

vsix multi template project creates an extra folder

I am trying to create a multi project template (.vsix) file. One of the projects has a reference to two nuget packages. Everything works fine except for the part where the project itself gets created. It creates an additional folder under the root folder. So if I call my project "Prj1" it will create the sub projects under Prj1 -> Prj1 -> Sub Projects. I dont want it to do this, and as a result of this the package references and everything does not work. I tried searching the web for a solution and all I found is this
Issue with visual studio template & directory creation
But here also I am not sure if this solves the problem based on the comments. Is there any standard fix for this?

Visual Studio 2013 export Property Sheets to Template

I am Creating a C++ Project template and using the export template wizard to do it.
I had added a custom property sheet to my template project (the one which am going to export)
on successfully exporting my project template I created a new project using the template, but the project fails to load saying that it can't find the property sheet (it mentions the project directory path and says no such file exists).
I know the same question has been asked before : Exporting .props files in project template VS2012/13
But it has no answer for a year
I even tried including the property sheet as part of the project before exporting. still the same error
Please Help!
Edit:
I even tried manually putting the .props file into the zip archive it still shows the same error.
I think the new project gets loaded before the .props file gets added to the new project directory.
Note : Manually putting the .props file into the new project directory and then reloading the project works. but I don't want to copy paste it every time I create a new project from the template.

VS Extension which declares a new project template and locate the generated project in a specific location of an imported tree

I would like to create a Visual Studio extension.
I installed Visual Studio 2012 and Visual Studio SDK 2012.
Now, I want my extension to create a new project template, and then to enable the user to create a new project of the new generated type. i.e: I would like that once the user will open VS and will click on "add new project", he will have a new project type in the list of the regular templates. The template will be a standard C project, with some additinal dependencies, some changes in the.vcxproj file, in the compiling configurations and more.
In additinal, I want that on the project creation, my extension will import an existiong solution from my computer to be the current VS solution, and that the new project will be added to a specific folder in that solution.
Is there any way to write code which is doing the described above, on the creation of a new project of the new template? Do I have any event/other handler on the template code, or in the package code, which I can use?
I googled tons, but I really don't know what is the best way I can do it...
Thanks a lot!

How to add existing project into Geany

I have an existing C++ project which is built with Gnu Make. I want to develop the source under Geany but am unable find a way to import it.
I know this i a rather old question, but it was first hit on my search for the exact question. Since I have figured it out now, I wanted to give an answer for future searchers.
One should create a new project. Select a name for the project, select a location for the project file, e.g. the root of the project directory and the the root of the project directory. That's it.
But - the documents tab is confusing, so I suggest installing a file browser plugin, by selecting Tools -> Plugin Manager and then select the plugin File Browser. This adds a tab that will enable browsing the files in the project.
Hope it helps.
You don't have to import your project.
In geany go to "Project/New" and you'll be able to create a new project. Select a name for your project, select a file to save its settings and select the base directory where your source files are.
Then you'll be able to build to project with "Build/Make". It will run make within the base directory you selected. You can customise the build commands if you go to "Build/Set build commands".

How to add an existing VC6 project in to a workspace from add-in or VBS macro

I want to add an existing VC6 project in to a workspace from add-in or VBS macro.
There is no function to insert an existing project in Developer Studio's Application object.
So I tried to add a new project (with the same name of existing project) using Application's AddProject method and then overwrite the project file created with my existing project file. But it did not work.
Is there any other way to achive this. Please help.