Skip to content

Commit e029035

Browse files
authored
Fix NuGet errors when consumed by apps (#297)
This PR fixes our consumption of the `Microsoft.Windows.CppWinRT` package reference to use `Update` instead of `Include` (so at best it "updates" which version to use and doesn't conflict with what RNW wants) and removes the "duplicate reference" warning our customers see. I'm 99% we don't need the entry at all in newer RNW versions but leaving it for now to deal with older customers. This PR also removes the NuGet `package.lock.json` file from the published npm package, as it takes the decision to use/respect lock files away from the customer.
1 parent 7d98a73 commit e029035

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "Fix NuGet errors when consumed by apps",
4+
"packageName": "react-native-xaml",
5+
"email": "jthysell@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}

package/.npmignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

package/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"windows/",
6060
"lib/",
6161
"src/",
62-
"!*.ruleset"
62+
"!*.ruleset",
63+
"!*.lock.json"
6364
]
6465
}

package/windows/ReactNativeXaml/ReactNativeXaml.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@
253253
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
254254
<ItemGroup Condition="'$(RnwUsesPackageReference)'=='true'">
255255
<PackageReference Include="CDebug" Version="0.0.3" />
256-
<PackageReference Include="Microsoft.Windows.CppWinRT" Version="$(CppWinRTVersion)" PrivateAssets="all" />
256+
<PackageReference Update="Microsoft.Windows.CppWinRT" Version="$(CppWinRTVersion)" PrivateAssets="all" />
257257
</ItemGroup>
258258
<ImportGroup Label="ReactNativeWindowsTargets">
259259
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets')" />

0 commit comments

Comments
 (0)