wixtoolset / issues

WiX Toolset Issues Tracker
http://wixtoolset.org/
130 stars 24 forks source link

Regression: Localization variables no longer support a . (dot) in the Id #8713

Open philipp-naused opened 3 months ago

philipp-naused commented 3 months ago

WiX Version

5.0.1

.NET or MSBuild or Visual Studio Version

9.0.100-preview.7.24407.12

HeatWave Version

1.0.4

Windows Version

Win10 22H2

Repro Repo

https://github.com/philipp-naused/WiXIssue_1

Repro Steps

  1. Create a basic MSI package project
  2. Add a . to the Id of a localization variable
  3. Run dotnet build

The Repro Repo has this already set up. Just run dotnet build

Actual Result

The build fails with this error: error WIX0102: The localization variable !(loc.Downgrade) is unknown. Please ensure the variable is defined.

Expected Result

Localization variables should support having a . in the Id. Other variables and properties do support this. This is a regression from WiX 3, where this used to work.

I could not find any info about this being an intended breaking change.

Acknowledgements

bevanweiss commented 3 months ago

It's this line of code that is doing the capture of that second dot https://github.com/wixtoolset/wix/blob/1011c5609bc12ded5188dc76484fc5075d24617c/src/wix/WixToolset.Core/Common.cs#L770

Which is putting the second portion into a 'scope' for the variable. The first portion becomes the 'name', which the lookups use (hence why it's not finding a match).

I had thought that this scope part only applied to bind variables, and not WiX / Loc(alization) variables. I might be wrong on this however. But I'll put forward a PR for it.