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

Component identifier does not defaults to the identifier of the resource that is the explicit keypath of the component #7945

Closed
1 task done
danielh1989 opened this issue Jan 4, 2024 · 3 comments
Assignees
Labels
Milestone

Comments

@danielh1989
Copy link

danielh1989 commented Jan 4, 2024

WiX Version

4.0.3

.NET or MSBuild or Visual Studio Version

VS Version 17.8.3

HeatWave Version

1.0.2.1

Windows Version

Windows 10 22H2

Repro Repo

No response

Repro Steps

  1. Have an existing Wix 3 project with following code:
    ...
    <ComponentRef Id="_MsgPack_dll_e3be" />
    ...
    <Component Guid="6a2255db-b511-48a4-8550-e7422112b31a" Permanent="no" SharedDllRefCount="no" Transitive="no" Directory="TARGETDIR">
    <File Id="_MsgPack_dll_e3be" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="MsgPack.dll" Source="MsgPack.dll" KeyPath="yes" />
    </Component>
  2. Convert existing Wix 3 project to Wix 4

Actual Result

Getting following compilation error:
Error WIX0094 The identifier 'Component:_MsgPack_dll_e3be' is inaccessible due to its protection level.

Expected Result

The Id of the File should be used and available as component ID as described in the documentation:
Id (String) : Component identifier; this is the primary key for identifying components. If omitted, the compiler defaults the identifier to the identifier of the resource that is the explicit keypath of the component (for example, a child File element with KeyPath attribute with value 'yes').

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).
@barnson barnson self-assigned this Jan 16, 2024
@barnson barnson added compiler and removed triage labels Jan 16, 2024
@barnson barnson added this to the v5.0.0-rc.1 milestone Jan 16, 2024
@barnson
Copy link
Member

barnson commented Jan 16, 2024

Accessibility of the keypath id should travel to the component id.

@barnson
Copy link
Member

barnson commented Jan 18, 2024

Eventually. For WiX v5, document the need for explicit ids if you want them outside the section.

@robmen
Copy link
Member

robmen commented Mar 14, 2024

This happened to get fixed in WiX v5-rc.1 as part of wixtoolset/wix#496 while implementing out-of-proc BAs

@robmen robmen closed this as completed Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants