MultipleProjects with single Template through wizard
-
Saturday, April 14, 2012 10:29 AM
I am having 3 projects with one template and wizard concept. when choosing the template the wizard will be shown. In that wizard some options will be there. based on the option chosen in the wizard i want to choose the project from that location and load the project.
so i need how to select the project when using wizard with single project template.
Please help me.
siva
All Replies
-
Monday, April 16, 2012 5:14 AM
Hi Anyone,
Please reply for the above question.
urgent requirement.
Multiple projects and each project having own template. one root template is there. when selecting the root template the wizard will be shown.
select options form wizard. based on the option selection we need to choose the project template to generate the project.
how can i do this ?
thanks,
siva
-
Tuesday, April 17, 2012 7:03 AM
siva, this is a duplicate thread with http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/eac11b54-bc1b-48b0-9927-3788481d8a2b
i think the article i provide in the above link is helpful.
-
Tuesday, April 17, 2012 1:53 PM
Hi Anyone,
Please reply for the above question.
urgent requirement.
Multiple projects and each project having own template. one root template is there. when selecting the root template the wizard will be shown.
select options form wizard. based on the option selection we need to choose the project template to generate the project.
how can i do this ?
thanks,
siva
this maybe of help
http://learnerps-dotnet.blogspot.com/2006/10/dotnet-project-template-and-addin.html
http://learnerps-dotnet.blogspot.com
-
Tuesday, April 17, 2012 2:26 PM
Hi ,
Thanks for the reply.
i am asking about Multi project template concept. am very well knew about normal project template with wizard concept.
Please try to understood my requirement. i have created multiproject template with wizard concept. based on the option chosen in the wizard i want to load the specific project.
Thanks,
Siva
siva
-
Wednesday, April 18, 2012 1:57 AMModerator
Your multiproject template could simply create the solution, and then add your project templates programatically. A quick internet search for AddFromTemplate and GetProjectTemplate should bring up some examples.
Sincerely,
Ed Dore
- Proposed As Answer by Ed DoreMicrosoft Employee, Moderator Wednesday, April 18, 2012 1:57 AM
-
Wednesday, April 18, 2012 3:50 AM
Hi Ed Dore,
Thanks for reply.
Yes. Solution.AddFromTemplate is dynamically add the template to the solution.
http://msdn.microsoft.com/en-us/library/envdte._solution.addfromtemplate(v=vs.80).aspx
soln.AddFromTemplate("D:\Program Files\Microsoft Visual Studio .NET\Vb7\VBWizards\ConsoleApplication\Templates\1033\ConsoleApplication.vbproj", "c:\temp2", "My New Project", True)
but it contains 4 parameters.
i want to pass only the zip file . i want get project name and destination name while creating new project by choosing the root template. Please check the below image.
i want to get above destination path and project name when choosing the template for creating the project.
how can i get these above params dynamically in C# and pass into AddFromTemplate method ?
2. GetProjectTemplate method requires to place the template in the following location.
<drive>:\Program Files\Microsoft Visual Studio 8\Common7\IDE\ProjectTemplates\Language
http://msdn.microsoft.com/en-us/library/envdte80.solution2.getprojecttemplate(v=vs.80).aspx
How can i create separate folder in that above location and place all my templates in that place.
Ex:
<drive>:\Program Files\Microsoft Visual Studio 8\Common7\IDE\ProjectTemplates\CSharp\MyFolder\MyTempalte.zip
i want to access MyTemplate.zip file from the above location.
Please help me.
Thanks,
siva
- Edited by Siva Rajini Wednesday, April 18, 2012 3:52 AM
-
Monday, May 07, 2012 4:37 PMModerator
Hi Siva,
Your solutions IWizard.RunStarted method will be passed a dictionary, this dictionary will contain values for the keys "$destinationdirectory$" and "$safeprojectname$" that will retrieve the values you're looking for.
As to the installation question, that's simply a matter of authoring a installer. However, I'd suggest using VSIX as your deployment method if you are targeting VS 2010. It's quite a bit easier, and you don't have to worry creating folders and what not.
VSIX Project Template
VSIX Deployment
Export Template Wizard
Sincerely,Ed Dore
- Proposed As Answer by Ed DoreMicrosoft Employee, Moderator Monday, May 07, 2012 4:37 PM
- Marked As Answer by lucy-liuModerator Wednesday, May 09, 2012 3:38 AM
- Unmarked As Answer by Siva Rajini Wednesday, May 09, 2012 4:25 AM
-
Wednesday, May 09, 2012 4:27 AM
Hi Ed Dore,
Thanks for the help.
I can manage to solve the issues by myself.
Thanks again for your support.
Thanks,
siva
- Edited by Siva Rajini Wednesday, May 09, 2012 4:27 AM
- Marked As Answer by Ed DoreMicrosoft Employee, Moderator Thursday, May 10, 2012 4:14 PM

