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;
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
add a comment |
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
add a comment |
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
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
.net visual-studio
asked Mar 27 at 10:17
DevDev
1301 silver badge7 bronze badges
1301 silver badge7 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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.
- First for project (root wizard). It will be as in .vstemplate file. Here you write logic for cancel, back button or for project names.
- 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.
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
- First for project (root wizard). It will be as in .vstemplate file. Here you write logic for cancel, back button or for project names.
- 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.
add a comment |
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.
- First for project (root wizard). It will be as in .vstemplate file. Here you write logic for cancel, back button or for project names.
- 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.
add a comment |
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.
- First for project (root wizard). It will be as in .vstemplate file. Here you write logic for cancel, back button or for project names.
- 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.
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.
- First for project (root wizard). It will be as in .vstemplate file. Here you write logic for cancel, back button or for project names.
- 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.
edited Mar 29 at 9:41
answered Mar 29 at 8:30
DevDev
1301 silver badge7 bronze badges
1301 silver badge7 bronze badges
add a comment |
add a comment |
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.
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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