문제

I have a multi-project Visual Studio project template. I want to be able to, conditionally, exclude specific projects from the created solution.

I've looked into the ProjectFinishedGenerating method of my IWizard implementation, but I can't seem to figure out how to simply ignore a project.

So, essentially I want to do something like this pseudo-code in my IWizard implementation for projects:

public void ProjectFinishedGenerating(Project project)
{
   if(ExcludeAcmeProject && project.Name=="Acme"))
   {
      project.Cancel();
   }
}
도움이 되었습니까?

해결책

I figured it out. I can look at the customParams parameter in the RunStarted method (it contains the path of the .vstemplate file) and throw a WizardCancelledException if I want to skip that specific project.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top