locked
Using the Extensibility --> VSIX Project with a web application - Error TemplateProjectOutputGroup does not exist RRS feed

  • Question

  • I am using Visual Studio 2010 Premium.  I have created a Web Application that I would like to use as a project template.  I am able to successfully use the Export Template Extension to creat the VSIX file.  However, I have the following issues when trying to do it this way.

    • On File -->  New Project dialog, the template only shows up under Visual Basic and not under Web.
    • I don't want to type in all that information every time I want to create a VSIX.

    My solution was to add a VSIX Project (Visual Basic --> Extensibility --> VSIX Project) to my solution that contains the Web Application.  Then add a .vstemplate file to my web project so I can fine tune what I want.

    I got as far as adding the VSIX project to my solution and I cannot build the project.  I receive the following error.

    Description:  The target "TemplateProjectOutputGroup" does not exist in the project.

    File: WebApplication.vbproj (This is my VB project file to my web application).

    The error goes away when I remove the VSIX project from the solution.  How can I fix this?


    Tray
    Thursday, September 1, 2011 5:57 PM

Answers

All replies

  • Hi Tray,

     

    >>On File --> New Project dialog, the template only shows up under Visual Basic and not under Web.

     

    This is because by default the template file is copied to ProjectTemplates. We can create sub folders to organize the templates, for example, if want to put it into Web section, you need to create a sub folder called Web under ProjectTemplates and move your templates into that folder.

     

    Since VSIX package is based on zip file, we can rename it as zip extension, and  extract it into a folder.  You will find the your templates in the ProjectTemplates. Create your new “web” folder under that and move your templates into new sub folder. Finally, you need to re-zip the all contents and rename it back to vsix.

     

    >>Description: The target "TemplateProjectOutputGroup" does not exist in the project.

     

    The VSIX project allowed a template project as an item/project  templates. Your project is web application, therefore, it will pop such exception. As a workaround, you can export your project as an Project Template using File -> export Template. In your VSIX project, you can add the file as the project template.

     

    You can just create sub folder in VSIX project via solution explorer and move the added templates into new item group.

     

    Hope my explanation helps.

    Yi


    Yi Feng Li [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, September 2, 2011 3:04 AM
  • Yi,

    Thank you very much for the reply.  I figured out yesterday that the VSIX container was nothing more than a zip file.   I was hoping for a process that did not require manual copy.  Therefore, I was going to unzip the contents and try to integrate:

    <VSTemplate Include="MyTemplate.vstemplate">  <OutputSubPath>Windows</OutputSubPath> <Culture>1041</Culture></VSTemplate>

    into the project file somehow, similar to what I can do with the Visual Basic Project Template under Extensibility.

    Tray

     


    Tray
    Friday, September 2, 2011 12:24 PM
  • Hi Tray,

    It seems your understanding correctly and glad to know you have got a workaround.

    Cheers,

    Yi


    Yi Feng Li [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Tray Williams Wednesday, September 7, 2011 8:02 PM
    Monday, September 5, 2011 6:16 AM
  • Yi,

    It appears that adding those lines to the .vstemplate file created during the Export to VSIX process does not have any affect.

    Here is what I am trying to accomplish:

    ** One (1) vsix file containg my Web Application template. (COMPLETE)

    ** When installed, the icon and preview images show up in New Project dialog (COMPLETE)

    ** I want to have the template show up under both Visual Basic and Web (under visual basic) (can only get it under one unless I create a folder structure in my vsix zip file.

    ** I need to use template parameters in my web.config (not working)

    Here is what I have tried so far:

     

    1) Create my web application.

    2) File -->  Export Template as VSIX (Export Template Wizard Extension)

    3) Modify the VSIX zip file and the Web Application zip file contents. 

    Is there any comprehensive documentation on this? 


    Tray
    Wednesday, September 7, 2011 12:38 PM
  • See also: this thread

    Ryan

    • Marked as answer by Tray Williams Wednesday, September 7, 2011 8:02 PM
    Wednesday, September 7, 2011 6:49 PM
  • Please take a look at this question also:

    VSIX Identifier issue

    Sunday, October 5, 2014 8:07 AM