locked
Installed Vsix template is not shown on new project section RRS feed

  • Question

  • Hi,

    To create a vsix template i repeated the following steps ;

    - Created an empty web application project 

    - Exported the project as a zip file.

    - Created a vsix project.

    - Added template project's zip file as a content to manifest file of vsix project.

    - Builded the vsix project and installed template using .vsix file

    After following the above steps and restarting visual studio, i saw my template in Tools-> ExtensionManager section. 

    But i can not see the template  in the new project-> Visual C# -> web section. The directory of the content file added to vsix project is "ProjectTemplates\Web\WebApp".

    I couldn't find what is missing .

    Thanks for help,

    HighHopes

    Wednesday, August 24, 2011 11:53 AM

Answers

  • Hi Bertan,

    Actually i solved the problem using an extension "Export template as Vsix". But what i'm trying to do is creating a multi project template. I could'nt find a way to do this with vsix installer. So i used "Export template" feature for each project of my solution. The feature created zip files for each project. With unzipping the files and creating a root .vstemplate file , i succeeded creating a multi project template . Anyway what's missing in my template is , i could not create template dynamically. I mean  while creating a project with my template , i want to change the project names , too. But now i  have to replace the project names manually.I'm still searching if there's anything else to do these dynamically. it'll be much more useful if the template gives an option or a wizard to rename a projects of a solution while creating a new one from the template.

     

    Thanks for help,

    HighHopes

    • Marked as answer by Yi Feng Li Thursday, September 1, 2011 2:45 AM
    Friday, August 26, 2011 6:26 AM

All replies

  • Hi,

    There is an article on MSDN explaining how to create a VSIX containing a new project template that might be helpful: http://msdn.microsoft.com/en-us/library/dd885241.aspx, also there is an extension that automatically exports a project as a VSIX extension at http://visualstudiogallery.msdn.microsoft.com/57320b20-34a2-42e4-b97e-e615c71aca24

    Also I would verify that the zip file works correctly by placing it to My Documents\Visual Studio 2010\Templates\ProjectTemplates, it should appear the next time you launch New Project Dialog. If it doesn't there might be something wrong with the zip file itself.

    Otherwise I would check how you are adding the entry for zip file in to the manifest as it must marked as ProjectTemplate content for it to work correctly and I believe the content should point to the path containing the zip file and not the zip file itself.

     

    Thanks,

    Bertan

    Wednesday, August 24, 2011 10:43 PM
  • Hi Bertan,

    Actually i solved the problem using an extension "Export template as Vsix". But what i'm trying to do is creating a multi project template. I could'nt find a way to do this with vsix installer. So i used "Export template" feature for each project of my solution. The feature created zip files for each project. With unzipping the files and creating a root .vstemplate file , i succeeded creating a multi project template . Anyway what's missing in my template is , i could not create template dynamically. I mean  while creating a project with my template , i want to change the project names , too. But now i  have to replace the project names manually.I'm still searching if there's anything else to do these dynamically. it'll be much more useful if the template gives an option or a wizard to rename a projects of a solution while creating a new one from the template.

     

    Thanks for help,

    HighHopes

    • Marked as answer by Yi Feng Li Thursday, September 1, 2011 2:45 AM
    Friday, August 26, 2011 6:26 AM
  • I have the same problem. My template shows up on the tools entry of the extensions UI but no in file new project.

    The MSDN article at http://msdn.microsoft.com/en-us/library/dd885241.aspx mentions a sub-step under step 4.) that says "In the Content section, add a Project Template content type and set its path to the name of the .zip file."

    This through me off. There is no "Content section" that I can find when editing the manifest using the manifest editor. However after looking all over I finally found that clicking the"Assets" tab and then the "New" button there allowed me to see a pull-down that had "Microsoft.VisualStudio.ProjectTemplate" in it. So I chose it. Then I added the file using the UI on that dialog to add my template zip file to the project.

    So I hope this works. I say hope because I also get an error when installing the vsix file telling me the MSI installer prop cannot be set to true. I have not found how to change that other than to crack open the vsix file and manually editing the property. I did that at least once yesterday without the error and that is when I noticed the vsix file wasn't installing the template as a project template. But today as I rezip the vsix file and use it, I am told it is an invalid vsix file. Must not be holding my mouth right today. Tried using VS 2010 to edit and save the vsixmanifest file after unzipping and also notepad but today that isn't working.

    Can't seem to find this "setting" in the project itself so I don't have to crack open the vsix file and avoid that fiasco.


    R.D. Holland

    Wednesday, August 7, 2013 5:36 PM
  • I finally figured out what was wrong with my editing of the extension.vsixmanifest file. I used 7-zip and recreated the file using the Explorer shortcut menu from 7z to create a .7z file, which I renamed to vsix. I saw the shortcut menu had an option to compress to a .zip file. I did that and renamed it and my vsix file was valid and my template installed.

    R.D. Holland

    Wednesday, August 7, 2013 5:50 PM
  • I finally figured out what was wrong with my editing of the extension.vsixmanifest file. I used 7-zip and recreated the file using the Explorer shortcut menu from 7z to create a .7z file, which I renamed to vsix. I saw the shortcut menu had an option to compress to a .zip file. I did that and renamed it and my vsix file was valid and my template installed.

    R.D. Holland

    Hi, first of all, sorry for my english.

    You can uses the templates in Shell Isolated?. I don't know if you can help me but any assistance or if you can refer to somewhere that provides this information I would appreciate it.

    Thank you very much.
    Fabiana.

    Friday, August 9, 2013 2:47 PM