locked
New Language type for New Project in VS 2005 RRS feed

  • Question

  • I want to create a new entry in the Project Types list on Visual Studio 2005. The desired behavior would be for it to not appear under any of the existing entries like Visual C++, Other Languages, or Other Project Types, but for it to be a new, seperate entry. I already have created a wizard using the IDTWizard interface and vsz and vsdir files that appear under Visual C++, but that is not the desired behavior. If it helps, I create a vcproj file in the code. But it does not seem to affect anything since if I place the vsz and vsdir files in the VC#\CSharpProject my entry would appear under Visual C# as well. But I need it to appear a level above in the tree.

    Further, if this can be achieved, I would like to create a custom Add New Item dialog which would contain only my templates rather than existing ones or under My Templates.

    If anyone can guide me to a detailed guide about vsz and vsdir files that would be great. I feel it's just a matter of playing around with those files and placing them in the right folder, but I just can't seem to figure it out.

    Thank you very much in advance.

    Thursday, July 1, 2010 5:09 PM

Answers

  • You'll want to check out the IronPythonIntegration sample that ships with the Visual Studio SDK. It illustrates a custom project type, with project wizards registered similar to what you describe(in particular the parameters use with the ProvideProjectFactory attribute). This is actually done through the registry, and not .vsz/.vsdir files. If you're creating a custom project system, with .vsz based project wizards, you may need to use the C++ project system as a guideline, as they still use this older technology for their project system.

    Sincerely,


    Ed Dore
    Friday, July 2, 2010 5:17 AM
  • Hello,

    As what Ed Dore said, The VSDir/Vsz are deprecated, only the VC++ and a few projects still use it, today we use zipped vstemplates(deployed in C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplates). For a full instruction of the project templates, please see this link

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

    If you think the Ironpython sample is complex, you could try the walkthrough for simple project type. http://msdn.microsoft.com/en-us/library/cc512973.aspx. This walkthrough will show you how to create a node for a custom project type in Add new project dialog.

    PS: It is not possible to add a custom Add New Item dialog, the itemTemplates was placed in C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates, and it will filter the item templates according to the folder and content of *.vstemplate. You could also implement the IVsFilterAddProjectItemDlg2 in your projectNode class to filter the templates.

    Thanks

    Chao

    • Marked as answer by Chao Kuo Thursday, July 8, 2010 2:13 AM
    Wednesday, July 7, 2010 5:21 AM

All replies

  • You'll want to check out the IronPythonIntegration sample that ships with the Visual Studio SDK. It illustrates a custom project type, with project wizards registered similar to what you describe(in particular the parameters use with the ProvideProjectFactory attribute). This is actually done through the registry, and not .vsz/.vsdir files. If you're creating a custom project system, with .vsz based project wizards, you may need to use the C++ project system as a guideline, as they still use this older technology for their project system.

    Sincerely,


    Ed Dore
    Friday, July 2, 2010 5:17 AM
  • I found the following link: http://msdn.microsoft.com/en-us/library/aa290343(VS.71).aspx which is for Visual Studio .NET and I'm using 2005. So when I try to navigate to the said registry key, in my registry I have HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0 and after that I don't have a NewProjectTemplates.

    But then I found http://msdn.microsoft.com/en-us/library/bb165750(v=VS.80).aspx 

    In here, can you please explain what the following means:

    [Projects\{ProjectGUID}]
    @="MyProjectType"
    "DisplayName"="#2"
    "Package"="{VSPackageGUID}"
    "ProjectTemplatesDir"="C:\\MyProduct\\MyProjectTemplates"

    I am sorry for asking for even the little details but I am new to VS SDK. Thank you so much

    Friday, July 2, 2010 11:40 PM
  • Hello,

    As what Ed Dore said, The VSDir/Vsz are deprecated, only the VC++ and a few projects still use it, today we use zipped vstemplates(deployed in C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplates). For a full instruction of the project templates, please see this link

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

    If you think the Ironpython sample is complex, you could try the walkthrough for simple project type. http://msdn.microsoft.com/en-us/library/cc512973.aspx. This walkthrough will show you how to create a node for a custom project type in Add new project dialog.

    PS: It is not possible to add a custom Add New Item dialog, the itemTemplates was placed in C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates, and it will filter the item templates according to the folder and content of *.vstemplate. You could also implement the IVsFilterAddProjectItemDlg2 in your projectNode class to filter the templates.

    Thanks

    Chao

    • Marked as answer by Chao Kuo Thursday, July 8, 2010 2:13 AM
    Wednesday, July 7, 2010 5:21 AM