-
Notifications
You must be signed in to change notification settings - Fork 255
Set better defaults for references and project references to keep MdMerge happy. #612
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
/azp build |
Command 'build' is not supported by Azure Pipelines. Supported commands
See additional documentation. |
/azp run |
No pipelines are associated with this pull request. |
@@ -43,6 +43,20 @@ Copyright (C) Microsoft Corporation. All rights reserved. | |||
<ProxyFileName Condition="'%(Midl.ProxyFileName)'==''">nul</ProxyFileName> | |||
<TypeLibraryName Condition="'%(Midl.TypeLibraryName)'==''"></TypeLibraryName> | |||
</Midl> | |||
<ProjectReference Condition="'$(XamlLanguage)' != 'C++'"> |
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.
these are defaults. if necessary, users could explicitly override in the IDE?
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.
Correct. Overrides are possible per reference, for all references or conditionally.
I like the "to keep MdMerge happy" part. 😉 |
leaf node |
What's the status of this PR? |
@kennykerr I need to test the razzle build. Will try to do that tomorrow. |
64e1e5a
to
1207ffc
Compare
/azp run |
No pipelines are associated with this pull request. |
Current released versions of MdMerge don't like duplicate definitions. This PR attempts to reduce the duplication by not copying reference output to the output folder by default unless this is an application. An application is always a leaf node and its winmd should never be merged into something else anyway.
Overrides are still possible since this is defined in the props file which is imported very early in the build process, to allows folks to change the default if needed. Unit test projects are an example where this might be needed, but there is not a good way to detect them.
A non-C++/WinRT project won't get these defaults and those projects might still require manually setting Private=false, if it is reference by a C++/WinRT project, so this solution isn't perfect but it helps somewhat.
TODO:
Fixes #452