Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from

Conversation

fredemmott
Copy link

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

I used #error based on line 5

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 added a commit that referenced this pull request Jul 20, 2024
@oleg-shilo
Copy link
Owner

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 added a commit that referenced this pull request Aug 4, 2024
- #1574: Cannot build .net 8 example project
- #1587 Support for pulling in dlls for runtime dependencies
- VSTemplates update. Added warning message about `project.GUID`. Triggered by #1597   Contributed by @fredemmott
- Added errorhandling to continue extecution if WiX extension is not install. The error will still be reported by the WiX compiler
- Added `Project.AddCastomActionRefAssembliesOf` to add CA referenced assemblies programmatically.
@fredemmott fredemmott closed this Aug 4, 2024
@fredemmott fredemmott deleted the patch-1 branch August 4, 2024 13:24
@oleg-shilo
Copy link
Owner

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

@nefarius
Copy link

nefarius commented Aug 4, 2024

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
Copy link
Owner

oleg-shilo commented Aug 5, 2024

... 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
Copy link
Owner

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
Copy link
Owner

oleg-shilo commented Aug 10, 2024

Done.
VSTemplates v2.2.8

  • added VS auto-generated project GUID ($guid1$)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants