I've created a multi-project template using the SideWaffle Creator. Everything works perfectly, so I add a custom wizard that implements IWizard and I add it to the template.vstemplate file:
When I run the template (File > New Project) the RunStarted event on the IWizard class runs fine:
private DTE dte = null;
public void RunStarted(object automationObject, Dictionary<string, string> replacementsDictionary,
WizardRunKind runKind, object[] customParams)
{
if (automationObject is DTE)
dte = (DTE)automationObject;
}
But it looks like the RunFinished method runs immediately after RunStarted:
public void RunFinished()
{
var solution = dte.Solution;
var projects = solution.Projects; // solution.Projects.Count = 0
}
The project is also only generated after the RunFinished method is called. This means that I can't run any project specific code after the wizard finishes, since any project in the solution is essentially null. Using the "old" TemplateBuilder way this approach used to work fine. Not sure if I'm missing anything
Any advice would be highly appreciated. Many Thanks!
Hi Guys,
I've created a multi-project template using the SideWaffle Creator. Everything works perfectly, so I add a custom wizard that implements IWizard and I add it to the template.vstemplate file:
When I run the template (File > New Project) the RunStarted event on the IWizard class runs fine:
But it looks like the RunFinished method runs immediately after RunStarted:
The project is also only generated after the RunFinished method is called. This means that I can't run any project specific code after the wizard finishes, since any project in the solution is essentially null. Using the "old" TemplateBuilder way this approach used to work fine. Not sure if I'm missing anything
Any advice would be highly appreciated. Many Thanks!