locked
Custom Project Templates RRS feed

  • Question

  • How can i create custom Project Templates with wizards and some predefined c# code with some refernces of dll's in Visual Studio 2010.

    i  need to have 3-4 wizards with some custom c# code.

     

    Thursday, August 5, 2010 4:50 PM

Answers

  • Hi DotnetHungry,

     

    Thanks for your post.

    Firstly, for the part to create wizard, you can create as many as you like as the following walkthrough.

    http://msdn.microsoft.com/en-us/library/7k3w6w59.aspx

    Secondly, you can edit your C# code and add new references as you'd like to start with when a new project instance is created.

    Finally, try to package the project as a template, which can reference to:

    http://msdn.microsoft.com/en-us/library/ff527343.aspx

    Hope the template can meet your request. 

     

    Looking forward to your reply.

     

    Best Regards,

    Ziwei Chen

     

     

    • Marked as answer by DotnetHungry Wednesday, August 18, 2010 2:47 PM
    Monday, August 9, 2010 2:47 AM
  • Hello again,

     

    Thanks for your feedback.

    There are several possibilities may cause this problem.

    Is your vsz file in the right format? It have to be stored as ANSI format. The best way to make this work is to find an existing .vsz file and copy your contents into it.

    Is the register for COM Interop checkbox checked in the project properties?

     

    If you still have problems, be free to let me know.

     

     

    Best Regards,

    Ziwei Chen

     

    • Marked as answer by Victor_Chen Thursday, August 12, 2010 7:51 AM
    Tuesday, August 10, 2010 2:27 AM

All replies

  • Hi DotnetHungry,

     

    Thanks for your post.

    Firstly, for the part to create wizard, you can create as many as you like as the following walkthrough.

    http://msdn.microsoft.com/en-us/library/7k3w6w59.aspx

    Secondly, you can edit your C# code and add new references as you'd like to start with when a new project instance is created.

    Finally, try to package the project as a template, which can reference to:

    http://msdn.microsoft.com/en-us/library/ff527343.aspx

    Hope the template can meet your request. 

     

    Looking forward to your reply.

     

    Best Regards,

    Ziwei Chen

     

     

    • Marked as answer by DotnetHungry Wednesday, August 18, 2010 2:47 PM
    Monday, August 9, 2010 2:47 AM
  • I have tried to implement the same thing that is defined in the following URL

    http://msdn.microsoft.com/en-us/library/7k3w6w59.aspx

    But I'm Getting the Following error "INVALID AT TOP LEVEL OF DOCUMENT"

    I have Tried to resolve this issue and tried the following steps

    1. [ComVisible(true)]

    2. Wizard Parameter to MyNewWizard.Class1 in the vsz file.

    3. Checked the Class GUID in the Registry. I found the entry in the Registry with my Class name.

     Please let me know what else are needed to solve this error.

     

    Thanks

     

    Monday, August 9, 2010 3:44 PM
  • Hello again,

     

    Thanks for your feedback.

    There are several possibilities may cause this problem.

    Is your vsz file in the right format? It have to be stored as ANSI format. The best way to make this work is to find an existing .vsz file and copy your contents into it.

    Is the register for COM Interop checkbox checked in the project properties?

     

    If you still have problems, be free to let me know.

     

     

    Best Regards,

    Ziwei Chen

     

    • Marked as answer by Victor_Chen Thursday, August 12, 2010 7:51 AM
    Tuesday, August 10, 2010 2:27 AM
  • Hi Chen,

       with your help, I was able to create a Project Template and a Wizard by implementing  one ClassLibrary, Project Template, and VSIX Package using Visual Studio 2010. I could display the Wizard when i select MyCustomproject Template.

    My Wizard basically has 4 CheckBox Options and a Botton, which allow the user to create different types of projects from the one Wizard.

    CheckBox Option 1. Create Project Type1

    CheckBox Option 2. Create Project Type2

    CheckBox Option 3. Create Project Type3

    CheckBox Option 4. Create Project Type4

    User can Select Only one Option to create a Project of specific Type and I have Finish Button.

    I need to create solutions for each type of Project. like the one we have in Visual Studio if the user wants to create Silverlight Application, WCF Application, Console Application or a Web Service.... Visual Studio will Automatically Loads appropiate Assembly references, Appropiate Class Files, namespaces, some Interfaces and some custom Code.

    Like wise I need to implement the same functionality in my Wizard. based on the user's selection I need to load a particaluar Solution, References, Custom C# code and appriate Assemblies, when He clicks the Finish Button.

    I appreciate Your help.

    Thanks

    Mohi

     

     

     

    Thursday, August 12, 2010 2:19 PM