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

Replace . with _ when generating authored component's targets. #1280

Merged
merged 1 commit into from
Nov 29, 2022

Conversation

j0shuams
Copy link
Contributor

@j0shuams j0shuams commented Nov 28, 2022

Users of CsWinRT Authoring may choose to create a NuPkg for their component. We have some automation tools for this scenario which generate a targets file for the project/nupkg to help with the custom build logic necessary for authored components.

Today the generated targets file uses the authoring project's AssemblyName, but fails to consider if that includes ..
E.g. AssemblyName = Microsoft.Coords vs. AssemblyName = Coords.

This oversight caused build failures because MSBuild targets cannot have . in their name.
The fix is to make sure the generated file replaces . with _ when generating target names.

Fixes #1229

I tested this with a sample authoring component and confirmed the targets' names change to valid format for MSBuild.

@j0shuams j0shuams requested a review from manodasanW November 28, 2022 20:04
@j0shuams j0shuams merged commit e3f6727 into master Nov 29, 2022
@j0shuams j0shuams deleted the jlarkin/gen-targets-fix branch November 29, 2022 17:08
dongle-the-gadget pushed a commit to dongle-the-gadget/CsWinRT that referenced this pull request Jul 29, 2023
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.

Targets file with invalid target names generated. Error when consumed from C++/WinRT app
2 participants