Skip to content

Commit 0a53d3c

Browse files
authored
Set better default for references and project references to keep MdMerge happy. (#612)
1 parent 8455a2a commit 0a53d3c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

nuget/Microsoft.Windows.CppWinRT.props

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,20 @@ Copyright (C) Microsoft Corporation. All rights reserved.
4343
<ProxyFileName Condition="'%(Midl.ProxyFileName)'==''">nul</ProxyFileName>
4444
<TypeLibraryName Condition="'%(Midl.TypeLibraryName)'==''"></TypeLibraryName>
4545
</Midl>
46+
<ProjectReference Condition="'$(XamlLanguage)' != 'C++'">
47+
<!-- By default, for a C++/WinRT project,
48+
don't copy project reference output to the output directory
49+
of the current project unless this is an exe. -->
50+
<Private>false</Private>
51+
<Private Condition="'$(ConfigurationType)' == 'Application' or '$(OutputType)'=='winexe' or '$(OutputType)'=='exe' or '$(OutputType)'=='appcontainerexe'">true</Private>
52+
</ProjectReference>
53+
<Reference Condition="'$(XamlLanguage)' != 'C++'">
54+
<!-- By default, for a C++/WinRT project,
55+
don't copy reference output to the output directory
56+
of the current project unless this is an exe. -->
57+
<Private>false</Private>
58+
<Private Condition="'$(ConfigurationType)' == 'Application' or '$(OutputType)'=='winexe' or '$(OutputType)'=='exe' or '$(OutputType)'=='appcontainerexe'">true</Private>
59+
</Reference>
4660
</ItemDefinitionGroup>
4761

4862
<ItemGroup>

0 commit comments

Comments
 (0)