Visual Studio custom project template with IWizardShould I add the Visual Studio .suo and .user files to source control?What are the various “Build action” settings in Visual Studio project properties and what do they do?How to rename a Project Folder from within Visual Studio?How do I add an existing directory tree to a project in Visual Studio?Using Git with Visual Studio.gitignore for Visual Studio Projects and SolutionsDifference between Build Solution, Rebuild Solution, and Clean Solution in Visual Studio?Can you force Visual Studio to always run as an Administrator in Windows 8?Using CustomParameter with Visual Studio Multi-Project TemplateVisual Studio project template with custom wizard

Heating Margarine in Pan = loss of calories?

What is the farthest a camera can see?

Boss asked a co-worker to assault me

What are those bumps on top of the Antonov-225?

Graphs for which a calculus student can reasonably compute the arclength

Is there a SQL/English like language that lets you define formulations given some data?

Do I have to cite common CS algorithms?

How should I write this passage to make it the most readable?

How to Check all AD userers for "blank" password?

How do I call a 6-digit Australian phone number with a US-based mobile phone?

How was the murder committed?

If "more guns less crime", how do gun advocates explain that the EU has less crime than the US?

Do Reform Jews believe in a theistic God?

Are differences between uniformly distributed numbers uniformly distributed?

How would timezones work on a planet 100 times the size of our Earth

In which case does the Security misconfiguration vulnerability apply to?

Are those flyers about apartment purchase a scam?

Markov-chain sentence generator in Python

Why did Saruman lie?

Tempoverlustspiel

If I animate and control a zombie, does it benefit from Undead Fortitude when it's reduced to 0 HP?

Running code generated in realtime in JavaScript with eval()

Will using a resistor in series with a LED to control its voltage increase the total energy expenditure?

Are there any other rule mechanics that could grant Thieves' Cant?



Visual Studio custom project template with IWizard


Should I add the Visual Studio .suo and .user files to source control?What are the various “Build action” settings in Visual Studio project properties and what do they do?How to rename a Project Folder from within Visual Studio?How do I add an existing directory tree to a project in Visual Studio?Using Git with Visual Studio.gitignore for Visual Studio Projects and SolutionsDifference between Build Solution, Rebuild Solution, and Clean Solution in Visual Studio?Can you force Visual Studio to always run as an Administrator in Windows 8?Using CustomParameter with Visual Studio Multi-Project TemplateVisual Studio project template with custom wizard






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I would like to create a custom project template with wizard.
As idea I took a MVC template in VS. First a created an multi project template and packed all in a zip file with My.vstemplate file



...
<TemplateContent>
<ProjectCollection>
<ProjectTemplateLink ProjectName="$safeprojectname$.DataAccess">
DataAccessMyTemplate.vstemplate
</ProjectTemplateLink>
<ProjectTemplateLink ProjectName="$safeprojectname$.Logic">
LogicMyTemplate.vstemplate
</ProjectTemplateLink>
<ProjectTemplateLink ProjectName="$safeprojectname$.Types">
TypesMyTemplate.vstemplate
</ProjectTemplateLink>
</ProjectCollection>
</TemplateContent>
<WizardExtension>
<Assembly>MyProjectWizard, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=null</Assembly>
<FullClassName>MyProjectWizard.WizardImplementation</FullClassName>
</WizardExtension>


In wizard I would like to chose a same type for my project configuration like "empty" or "full" etc.



I don't know what should I do to "remove" not needed project from created solution or how can I replace configuration for template in RunStarted method.



public bool ShouldAddProjectItem(string filePath)...


work only for item template.










share|improve this question






























    0















    I would like to create a custom project template with wizard.
    As idea I took a MVC template in VS. First a created an multi project template and packed all in a zip file with My.vstemplate file



    ...
    <TemplateContent>
    <ProjectCollection>
    <ProjectTemplateLink ProjectName="$safeprojectname$.DataAccess">
    DataAccessMyTemplate.vstemplate
    </ProjectTemplateLink>
    <ProjectTemplateLink ProjectName="$safeprojectname$.Logic">
    LogicMyTemplate.vstemplate
    </ProjectTemplateLink>
    <ProjectTemplateLink ProjectName="$safeprojectname$.Types">
    TypesMyTemplate.vstemplate
    </ProjectTemplateLink>
    </ProjectCollection>
    </TemplateContent>
    <WizardExtension>
    <Assembly>MyProjectWizard, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=null</Assembly>
    <FullClassName>MyProjectWizard.WizardImplementation</FullClassName>
    </WizardExtension>


    In wizard I would like to chose a same type for my project configuration like "empty" or "full" etc.



    I don't know what should I do to "remove" not needed project from created solution or how can I replace configuration for template in RunStarted method.



    public bool ShouldAddProjectItem(string filePath)...


    work only for item template.










    share|improve this question


























      0












      0








      0








      I would like to create a custom project template with wizard.
      As idea I took a MVC template in VS. First a created an multi project template and packed all in a zip file with My.vstemplate file



      ...
      <TemplateContent>
      <ProjectCollection>
      <ProjectTemplateLink ProjectName="$safeprojectname$.DataAccess">
      DataAccessMyTemplate.vstemplate
      </ProjectTemplateLink>
      <ProjectTemplateLink ProjectName="$safeprojectname$.Logic">
      LogicMyTemplate.vstemplate
      </ProjectTemplateLink>
      <ProjectTemplateLink ProjectName="$safeprojectname$.Types">
      TypesMyTemplate.vstemplate
      </ProjectTemplateLink>
      </ProjectCollection>
      </TemplateContent>
      <WizardExtension>
      <Assembly>MyProjectWizard, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=null</Assembly>
      <FullClassName>MyProjectWizard.WizardImplementation</FullClassName>
      </WizardExtension>


      In wizard I would like to chose a same type for my project configuration like "empty" or "full" etc.



      I don't know what should I do to "remove" not needed project from created solution or how can I replace configuration for template in RunStarted method.



      public bool ShouldAddProjectItem(string filePath)...


      work only for item template.










      share|improve this question














      I would like to create a custom project template with wizard.
      As idea I took a MVC template in VS. First a created an multi project template and packed all in a zip file with My.vstemplate file



      ...
      <TemplateContent>
      <ProjectCollection>
      <ProjectTemplateLink ProjectName="$safeprojectname$.DataAccess">
      DataAccessMyTemplate.vstemplate
      </ProjectTemplateLink>
      <ProjectTemplateLink ProjectName="$safeprojectname$.Logic">
      LogicMyTemplate.vstemplate
      </ProjectTemplateLink>
      <ProjectTemplateLink ProjectName="$safeprojectname$.Types">
      TypesMyTemplate.vstemplate
      </ProjectTemplateLink>
      </ProjectCollection>
      </TemplateContent>
      <WizardExtension>
      <Assembly>MyProjectWizard, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=null</Assembly>
      <FullClassName>MyProjectWizard.WizardImplementation</FullClassName>
      </WizardExtension>


      In wizard I would like to chose a same type for my project configuration like "empty" or "full" etc.



      I don't know what should I do to "remove" not needed project from created solution or how can I replace configuration for template in RunStarted method.



      public bool ShouldAddProjectItem(string filePath)...


      work only for item template.







      .net visual-studio






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 27 at 10:17









      DevDev

      1301 silver badge7 bronze badges




      1301 silver badge7 bronze badges

























          1 Answer
          1






          active

          oldest

          votes


















          0














          Ok, I found the solution. If you need something like Xamarin or ASP project template, where user can chose a project type and configuration, you need to create more implementation for the IWizard interface.



          1. First for project (root wizard). It will be as in .vstemplate file. Here you write logic for cancel, back button or for project names.

          2. Second's wizard for the sub projects(subProject.vstemplate). Here you can declare new variables like NuGet version from some storage (db, file..) and checks, should you create this project for this config or throw cancel exception.





          share|improve this answer


























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55374754%2fvisual-studio-custom-project-template-with-iwizard%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Ok, I found the solution. If you need something like Xamarin or ASP project template, where user can chose a project type and configuration, you need to create more implementation for the IWizard interface.



            1. First for project (root wizard). It will be as in .vstemplate file. Here you write logic for cancel, back button or for project names.

            2. Second's wizard for the sub projects(subProject.vstemplate). Here you can declare new variables like NuGet version from some storage (db, file..) and checks, should you create this project for this config or throw cancel exception.





            share|improve this answer































              0














              Ok, I found the solution. If you need something like Xamarin or ASP project template, where user can chose a project type and configuration, you need to create more implementation for the IWizard interface.



              1. First for project (root wizard). It will be as in .vstemplate file. Here you write logic for cancel, back button or for project names.

              2. Second's wizard for the sub projects(subProject.vstemplate). Here you can declare new variables like NuGet version from some storage (db, file..) and checks, should you create this project for this config or throw cancel exception.





              share|improve this answer





























                0












                0








                0







                Ok, I found the solution. If you need something like Xamarin or ASP project template, where user can chose a project type and configuration, you need to create more implementation for the IWizard interface.



                1. First for project (root wizard). It will be as in .vstemplate file. Here you write logic for cancel, back button or for project names.

                2. Second's wizard for the sub projects(subProject.vstemplate). Here you can declare new variables like NuGet version from some storage (db, file..) and checks, should you create this project for this config or throw cancel exception.





                share|improve this answer















                Ok, I found the solution. If you need something like Xamarin or ASP project template, where user can chose a project type and configuration, you need to create more implementation for the IWizard interface.



                1. First for project (root wizard). It will be as in .vstemplate file. Here you write logic for cancel, back button or for project names.

                2. Second's wizard for the sub projects(subProject.vstemplate). Here you can declare new variables like NuGet version from some storage (db, file..) and checks, should you create this project for this config or throw cancel exception.






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Mar 29 at 9:41

























                answered Mar 29 at 8:30









                DevDev

                1301 silver badge7 bronze badges




                1301 silver badge7 bronze badges





















                    Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







                    Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55374754%2fvisual-studio-custom-project-template-with-iwizard%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                    Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript