ligershark / template-builder

This project will output a NuGet package which can be used to help create Visual Studio Item Templates and Project templates
Other
42 stars 28 forks source link

Wizards being called twice - Regression #51

Closed CumpsD closed 10 years ago

CumpsD commented 10 years ago

When running 1.0.3.21-beta using the sample at http://imar.spaanjaars.com/Downloads/Other/SideWaffle/side-waffle-master.zip Multi Project templates work correctly, the ChildWizard RunStarted is only called once.

When upgrading to 1.0.3.49-beta, it is suddenly called twice, causing the following to throw an error:

replacementsDictionary.Add("$saferootprojectname$", RootWizard.GlobalDictionary["$saferootprojectname$"]);

When I use the builtin Wizards which are now present in TemplateBuilder.dll, the same happens.

sayedihashimi commented 10 years ago

Hmm, I'm not sure what could have happened there. That sample is pretty old.

I recently had someone go through creating a multi-project template and he was successful. I don't believe that he ran into this issue. He helped to create some docs which have been posted on the wiki _How to create a multi project template_. Can you follow along that to create your multi-project template and see if it works?

CumpsD commented 10 years ago

I followed that document with the latest version, but sadly enough with .49-beta it still occurs.

I can mail you my sln to repo if you'd like, can't upload it publicly yet since it's not done yet

sayedihashimi commented 10 years ago

I don't think the sample will help as I can repro it. Can you help me identify in what NuGet pig version the regression was introduced? From there we may be able to find the commit with the regression.

CumpsD commented 10 years ago

On nuget.org it jumps from .49-beta to .37-beta.

Not sure right now (at work and don't know by heart) but I think .37-beta didn't had the problem yet, would have to double check.

sayedihashimi commented 10 years ago

Below is an image with all the versions listed. If you help me locate the nuget pkg or commit that the regression was introduced I'll try and take it from there.

template-builder

sayedihashimi commented 10 years ago

@hovsepm do you have any ideas what may be happening here?

sayedihashimi commented 10 years ago

OK I have figured out what is happening. During the build process the WizardExtension element is being duplicated. See the image below.

This was introduced in commit f668a11df0f403520ae1457d3fd5a872ace2107d. Fix coming soon.

Good thing is that I learned something from this. You can have multiple WizardExtension elements in a .vstemplate file and each will be called.

wizard

sayedihashimi commented 10 years ago

OK I've released the fix in 1.0.3.52-beta on nuget.org. Let me know if you have any issues.

CumpsD commented 10 years ago

Thanks, I'll give it a shot later this week, dealing with some "Operation Not Supported" error on a different machine first, sigh... DTE, joy