Skip to content

Commit 6011748

Browse files
committed
fix by looking in winget-cli
- microsoft/winget-cli#5932
1 parent de4d6d3 commit 6011748

5 files changed

Lines changed: 28 additions & 17 deletions

vnext/PropertySheets/External/Microsoft.ReactNative.Composition.CppApp.props

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@
1818
<Warning Text="Property `RnwSdkDefaultsSet` was not set. Please ensure your project imports 'Microsoft.ReactNative.WindowsSdk.Default.props' before importing this prop sheet." />
1919
</Target>
2020

21+
<!--
22+
App projects do not generate Windows Metadata. Explicitly set this to
23+
prevent the CppWinRT NuGet target CppWinRTComputeGetResolvedWinMD from
24+
trying to compute it, which can cause MSB4006 circular dependency errors
25+
during parallel builds (see https://github.com/microsoft/cppwinrt/issues/950).
26+
-->
27+
<PropertyGroup Label="CppWinRT">
28+
<CppWinRTGenerateWindowsMetadata Condition="'$(CppWinRTGenerateWindowsMetadata)' == ''">false</CppWinRTGenerateWindowsMetadata>
29+
</PropertyGroup>
30+
2131
<!-- Import common props sheets common to all Composition projects. -->
2232
<Import Project="$(MSBuildThisFileDirectory)Microsoft.ReactNative.Composition.Common.props" />
2333

vnext/PropertySheets/External/Microsoft.ReactNative.Composition.CppLib.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
</Target>
1515

1616
<!--
17-
Lib/module projects generate Windows Metadata, so set this before importing
18-
Common props (which defaults it to false). This also prevents MSB4006
19-
circular dependency errors in CppWinRT during parallel builds.
20-
See https://github.com/microsoft/cppwinrt/issues/950.
17+
Lib/module projects generate Windows Metadata. Explicitly set this to
18+
prevent the CppWinRT NuGet target CppWinRTComputeGetResolvedWinMD from
19+
trying to compute it, which can cause MSB4006 circular dependency errors
20+
during parallel builds (see https://github.com/microsoft/cppwinrt/issues/950).
2121
-->
2222
<PropertyGroup Label="CppWinRT">
2323
<CppWinRTGenerateWindowsMetadata Condition="'$(CppWinRTGenerateWindowsMetadata)' == ''">true</CppWinRTGenerateWindowsMetadata>

vnext/PropertySheets/External/Microsoft.ReactNative.Cpp.Dependencies.props

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,6 @@
1212

1313
<PropertyGroup Label="CppWinRT">
1414
<CppWinRTVersion Condition="'$(CppWinRTVersion)' == '' Or $([MSBuild]::VersionLessThan('$(CppWinRTVersion)', '2.0.230706.1'))">2.0.230706.1</CppWinRTVersion>
15-
<!--
16-
Explicitly set CppWinRTGenerateWindowsMetadata to prevent the CppWinRT
17-
NuGet target CppWinRTComputeGetResolvedWinMD from running.
18-
That target can cause MSB4006 circular dependency errors during parallel
19-
builds (see https://github.com/microsoft/cppwinrt/issues/950).
20-
Default to false; lib/module projects that produce WinMD should override
21-
this to true in their own props.
22-
-->
23-
<CppWinRTGenerateWindowsMetadata Condition="'$(CppWinRTGenerateWindowsMetadata)' == ''">false</CppWinRTGenerateWindowsMetadata>
2415
</PropertyGroup>
2516

2617
<PropertyGroup Label="MSVC">

vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CppApp.props

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@
1818
<Warning Text="Property `RnwSdkDefaultsSet` was not set. Please ensure your project imports 'Microsoft.ReactNative.WindowsSdk.Default.props' before importing this prop sheet." />
1919
</Target>
2020

21+
<!--
22+
App projects do not generate Windows Metadata. Explicitly set this to
23+
prevent the CppWinRT NuGet target CppWinRTComputeGetResolvedWinMD from
24+
trying to compute it, which can cause MSB4006 circular dependency errors
25+
during parallel builds (see https://github.com/microsoft/cppwinrt/issues/950).
26+
-->
27+
<PropertyGroup Label="CppWinRT">
28+
<CppWinRTGenerateWindowsMetadata Condition="'$(CppWinRTGenerateWindowsMetadata)' == ''">false</CppWinRTGenerateWindowsMetadata>
29+
</PropertyGroup>
30+
2131
<!-- Import common props sheets common to all UWP projects. -->
2232
<Import Project="$(MSBuildThisFileDirectory)Microsoft.ReactNative.Uwp.Common.props" />
2333

vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CppLib.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
</Target>
1616

1717
<!--
18-
Lib/module projects generate Windows Metadata, so set this before importing
19-
Common props (which defaults it to false). This also prevents MSB4006
20-
circular dependency errors in CppWinRT during parallel builds.
21-
See https://github.com/microsoft/cppwinrt/issues/950.
18+
Lib/module projects generate Windows Metadata. Explicitly set this to
19+
prevent the CppWinRT NuGet target CppWinRTComputeGetResolvedWinMD from
20+
trying to compute it, which can cause MSB4006 circular dependency errors
21+
during parallel builds (see https://github.com/microsoft/cppwinrt/issues/950).
2222
-->
2323
<PropertyGroup Label="CppWinRT">
2424
<CppWinRTGenerateWindowsMetadata Condition="'$(CppWinRTGenerateWindowsMetadata)' == ''">true</CppWinRTGenerateWindowsMetadata>

0 commit comments

Comments
 (0)