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

Custom parameters in Multi Project templates #17

Closed UncleZen closed 10 years ago

UncleZen commented 10 years ago

I have a question about custom parameters.

For clarity, I am referring to your Sample Multi Project template. In there you have defined the parameter $slnname$ in the _Definitions\CSharp.vstemplate. It would be very useful to be able to use that custom parameter as replacement parameter in any file (e.g. default.aspx.cs) of child projects. Is this possible at all. If it is, can you please tell me how to accomplish this. If not, I'd suggest that you add this feature.

Thanks! Zen

sayedihashimi commented 10 years ago

Hi @UncleZen the .vstemplate file does have support for custom parameters. The reference is at http://msdn.microsoft.com/en-us/library/ms247063(v=vs.100).aspx. About my example where I declare $slnname$, I was trying to see if I could populate that parameter with the $safeprojectname$ for the multi project case, but it wasn't working. I need to remove that from the .vstemplate file as it is misleading. I'll close this item, but if the doc above doesn't answer your question re-open it with more details.

Thanks!

UncleZen commented 10 years ago

Thanks Sayed. I guess I am going to have to create a class thast implement IWizard to accomplish what I need to do.