Skip to content

Commit 7bcb997

Browse files
committedMar 15, 2025·
Remove 'WebView2' package dependency
1 parent 3f5d538 commit 7bcb997

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed
 

‎src/ComputeSharp.D2D1.WinUI/ComputeSharp.D2D1.WinUI.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
<WindowsSdkPackageVersion>10.0.22621.54</WindowsSdkPackageVersion>
66
<Platforms>x64;ARM64</Platforms>
77
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
8-
9-
<!-- Workaround for 'CoreWebView2' issue (see notes in ComputeSharp.WinUI) -->
10-
<WebView2EnableCsWinRTProjectionExcludeCoreRef>true</WebView2EnableCsWinRTProjectionExcludeCoreRef>
118
</PropertyGroup>
129

1310
<PropertyGroup>
@@ -25,6 +22,9 @@
2522

2623
<ItemGroup>
2724
<PackageReference Include="Microsoft.Graphics.Win2D" Version="1.3.2" />
25+
26+
<!-- Workaround for 'CoreWebView2' issue (see notes in ComputeSharp.WinUI) -->
27+
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3124.44" PrivateAssets="all" IncludeAssets="none" />
2828
</ItemGroup>
2929

3030
<ItemGroup>

‎src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj

+8-6
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,18 @@
55
<WindowsSdkPackageVersion>10.0.22621.54</WindowsSdkPackageVersion>
66
<Platforms>x64;ARM64</Platforms>
77
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
8-
9-
<!--
10-
Workaround for the 'CoreWebView2' SDK package referencing the WinRT implementation binary (Microsoft.Web.WebView2.Core.dll)
11-
when 'TargetPlatform=AnyCPU'. It's not needed for the CsWinRT projection, so set it to not be loaded at all to fix the build.
12-
-->
13-
<WebView2EnableCsWinRTProjectionExcludeCoreRef>true</WebView2EnableCsWinRTProjectionExcludeCoreRef>
148
</PropertyGroup>
159

1610
<ItemGroup>
1711
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.6.250228001" />
12+
13+
<!--
14+
The 'Microsoft.Web.WebView2' package that WindowsAppSDK has a transitive dependency on is an older version, which
15+
has a bug causing 'WebView2Loader.dll' to be referenced in the .pri file produced for this library. This breaks
16+
downstream consumers, as that .dll will not actually exist in the NuGet package (it's from the 'WebView2' package).
17+
Because we don't even need anything from this package at all anyway, we can fix this by just excluding it entirely.
18+
-->
19+
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3124.44" PrivateAssets="all" IncludeAssets="none" />
1820
</ItemGroup>
1921

2022
<ItemGroup>

0 commit comments

Comments
 (0)
Please sign in to comment.