Fix target override as it doesn't work when the target import order changes. - #977
Merged
Johan Laanstra (jlaanstra) merged 3 commits intoJul 8, 2021
Merged
Conversation
11 tasks
Contributor
|
I thought PackageReference was not supported for C++? |
Contributor
Author
|
There seems to be ways to enable it, see dotnet/project-system#2491 |
Collaborator
|
Kicked off a build. |
Contributor
Author
|
Normal validation passed. Since the react-native team is also experimenting with PackageReferences, tagging Julio César Rocha (@JunielKatarn) to see if he can test this for react-native. Probably don't have to block on that. To validate this, copy the Microsoft.Windows.CppWinRT.targets over the one in the NuGet package you currently use (I would recommend doing this without any PackageReference changes) and run a build locally. |
Kenny Kerr (kennykerr)
approved these changes
Jul 8, 2021
Johan Laanstra (jlaanstra)
added a commit
that referenced
this pull request
Jul 13, 2021
#977 removed an override of a built-in CX target that wasn't working reliably. Because of this, various targets to resolve the WinMD would no longer find the WinMD file. This never worked reliably but it turns out the Xaml designer uses one of these targets. This PR adds a BeforeTargets to ensure the WinMD will be resolved. Fixes #981
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current C++/WinRT override the GetResolvedWinMD target. However if the import order changes this override can easily break, like it does when NuGet imports the targets as part of PackageReference.
This PR removes the override.
Validation: