oleg-shilo / wixsharp

Framework for building a complete MSI or WiX source code by using script files written with C# syntax.
MIT License
1.12k stars 175 forks source link

Add #error to custom UI template reminding people to replace the GUID #1597

Closed fredemmott closed 3 months ago

fredemmott commented 4 months ago

There's a few google results for this GUID that probably shouldn't be using this GUID :)

I used #error based on line 5

oleg-shilo commented 4 months ago

Thank you Fred, Your change makes sense. I integrated it. I am closing this PR as the change needs to be done in the WiX4 branch wix-v4-master. I also changed it to a warning instead of an error. And repeated your approach for all templates.

Thank you for your contribution.

oleg-shilo commented 3 months ago

Please note that at the moment I only released the nuget packages. The project template extension is yet to be released.

nefarius commented 3 months ago

I'm not too familiar with dotnet templates, is it possible to generate a new random GUID each time a new project is created from it?

oleg-shilo commented 3 months ago

... is it possible ...

Not exactly.

You can have something like this:

project.GUID = Guid.NewGuid();

Ore even not setting it at all.

But this will lead to a new GUID being generated every time you build your msi. Not a great experience :(

And VS does not offer any other templating mechanism.

oleg-shilo commented 3 months ago

Well... I am wrong. There is a mechanism :) I do not know how I missed it: https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/eehb4faa(v=vs.100)?redirectedfrom=MSDN Will do a quick template update release.

Thank you for insisting on this.

oleg-shilo commented 3 months ago

Done. VSTemplates v2.2.8