-
Notifications
You must be signed in to change notification settings - Fork 263
Override GetResolvedWinMD to make sure all native build targets are aware of the C++/WinRT produced WinMD. #432
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
Conversation
…nMD. VS uses this to resolve project output.
|
I'm a bit nervous about overriding all these internal CX targets. That has the potential to make our nuget brittle (or at least specific to VS versions). What's wrong with the alternative of just setting GenerateWindowsMetadata back to true for the RC project template? You describe that as a "workaround" - how so? |
|
These are standard OutputGroup targets, meant to be overriden. |
|
@Scottj1s the other option is for us to override the GetResolvedWinMD target, to make it aware of the C++/WInRT WinMD. Thoughts? |
kennykerr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have we confirmed that:
- this allows both C#->C++ project references and
- activation works in that scenario automatically and
- a basic Razzle project builds successfully?
|
@kennykerr Added todo's, so you can see what I have verified. |
| Condition="'$(CppWinRTGenerateWindowsMetadata)' == 'true'" | ||
| <!-- This target overrides the GetResolvedWinMD target used to resolve the WinMD for native projects | ||
| so it is aware of the C++/WinRT generated WinMD. | ||
| Since not every project that consumesd C++/WinRT uses it to generate a WinMD, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
|
ok, let's give it a spin with vsix/razzle |
…References, so it can't depend on it.
Since the project templates no longer set the flags that enable the MSBuild logic to tell MSBuild about the CX generated WinMD, we have to override the GetResolvedWinMD target to ensure that VS and MSBuild pick up the correct WinMD project output. Unfortunately the target is not very extensible, so we have to override it.
VS uses this to resolve project output and without this change the PrimaryWinMDFullPath itemgroup is empty resulting in VS being unable to add project references to C++/WinRT projects.
TODO:
Fixes #425