c# - How to prevent project from generating from template? -


i creating multiproject visual studio template. created vsix package project , wizard class library. added projects assets in source.extension.vsixmanifest file of vsix project. in wizard class library added windows form, collect user inputs. need to, based on user inputs, add generated solution template additional projects. solution vstemplate file looks that:

<?xml version="1.0" encoding="utf-8"?> <vstemplate version="3.0.0" type="projectgroup" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" xmlns:sdk="http://schemas.microsoft.com/developer/vstemplate-sdkextension/2010">    <templatedata>    ...    </templatedata>    <templatecontent>      <projectcollection>        <solutionfolder name="app">           <projecttemplatelink projectname="$safeprojectname$.core">             core\core.vstemplate           </projecttemplatelink>           ...        </solutionfolder>      </projectcollection>    </templatecontent>    <wizardextension>      ...    </wizardextension> </vstemplate> 

but probles not listed projects in file not added zip template. thought, have 2 ways deal that:

  1. add projects vstemplate, , programmatically prevent of them add solution.
  2. somehow change build process , force visual studio add contents zip file during build.

i think second way more complicated. final ask how stop generating project template wizzard?

well seems found answer. created additional wizard , added link in child .vstemplate files. in wizard check replacementsdictionary["$safeprojectname$"] , if not need add project throw wizardcanceledexception , project not generated. folder project still created. simple call directory.delete() fixes it.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -