Skip to content

Directory symbol 'TARGETDIR' conflicts with a virtual symbol in a Merge Module #9012

Open
wixtoolset/wix
#637
@chrpai

Description

@chrpai

WiX Version

6.0.0-rc.2

.NET or MSBuild or Visual Studio Version

17.13.4

HeatWave Version

1.0.5.9

Windows Version

Win 24H2

Repro Repo

No response

Repro Steps

For a couple of decades now I've authored the directory table of a merge module like such:

<Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="MergeRedirectFolder">
  </Directory>
</Directory>

These days that gives the error:

It is no longer necessary to define the standard directory 'TARGETDIR'. Use the StandardDirectory element instead.
The Directory symbol 'TARGETDIR' conflicts with a virtual symbol. Use the 'override' access modifier to override the virtual symbol or use a different Id to avoid the conflict. Referenced from wixstd.wixlib

Removing the TARGETDIR directory element fixes the problem and the directory table is authored exactly like I've always authored it.

Is StandardDirectory element really a good suggestion in the context of a merge module which is generally abstract. I get no such error for other well known directory properties such as CommonAppDataFolder. I do get the WIX5437 warning for both.

Is there really any reason why not to allow authoring TARGETDIR as the resulting compile is the same anyways?

Actual Result

The Directory symbol 'TARGETDIR' conflicts with a virtual symbol. Use the 'override' access modifier to override the virtual symbol or use a different Id to avoid the conflict. Referenced from wixstd.wixlib

Expected Result

Compile without error but leave WIX5437 warning if approriate.

Acknowledgements

  • I acknowledge that this is a fully completed bug report. It is not a question or attempt to get help debugging my issue (because those should be sent to Discussions).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions