Skip to content

Commit

Permalink
Merge pull request #865 from Sergio0694/dev/update-uwp-samples
Browse files Browse the repository at this point in the history
Update .NET SDK and fix UWP/CsWinRT references
  • Loading branch information
Sergio0694 authored Oct 31, 2024
2 parents 0eb6583 + cdcbc58 commit 30ac237
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 63 deletions.
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.100",
"version": "8.0.403",
"rollForward": "latestFeature",
"allowPrerelease": false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<WindowsSdkPackageVersion>10.0.22621.54</WindowsSdkPackageVersion>
<UseUwp>true</UseUwp>
<UseUwpTools>true</UseUwpTools>
<Platforms>x64;arm64</Platforms>
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
<DefaultLanguage>en-US</DefaultLanguage>
Expand Down Expand Up @@ -38,13 +37,6 @@

<ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.1.6" />

<!--
This sample does not need WebView2, but WinAppSDK is pulling it in as a transitive NuGet
dependency. We can manually exclude all of its assets to avoid them being in the output.
This also prevents the old projections from being referenced and triggering the generator.
-->
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2792.45" IncludeAssets="none" />
</ItemGroup>

<ItemGroup>
Expand Down

This file was deleted.

9 changes: 0 additions & 9 deletions src/ComputeSharp.D2D1.Uwp/ComputeSharp.D2D1.Uwp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@

<PropertyGroup>

<!-- Also disabled in 'ComputeSharp.D2D1.WinUI', see notes there -->
<CsWinRTIIDOptimizerOptOut>true</CsWinRTIIDOptimizerOptOut>

<!-- Same warnings as in 'ComputeSharp.D2D1.WinUI', see notes there -->
<NoWarn>$(NoWarn);CS0419</NoWarn>
<NoWarn>$(NoWarn);IDE0065</NoWarn>
Expand All @@ -23,12 +20,6 @@

<ItemGroup>
<PackageReference Include="Win2D.uwp" Version="1.28.0-preview1" />

<!--
We need the CsWinRT reference for the generator to kick in and generate all necessary supporting code
to make the exposed types AOT compatible. Since we only need the generator, we can mark this as private.
-->
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.1.6" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
13 changes: 0 additions & 13 deletions src/ComputeSharp.D2D1.WinUI/ComputeSharp.D2D1.WinUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@

<PropertyGroup>

<!--
Disable IIDOptimizer, as it's causing a build error when the debug mode is set to embedded.
This is only needed when generating projections anyway, and not in normal C# class libraries.
See: https://github.com/microsoft/CsWinRT/issues/1478.
-->
<CsWinRTIIDOptimizerOptOut>true</CsWinRTIIDOptimizerOptOut>

<!--
Ignore some warnings about ambiguous cref attribute references. These are because the assembly defines
blittable bindings for several ABI types from Win2D, in the same namespace as the ABI types from the
Expand All @@ -32,12 +25,6 @@

<ItemGroup>
<PackageReference Include="Microsoft.Graphics.Win2D" Version="1.3.0" />

<!--
We need the CsWinRT reference for the generator to kick in and generate all necessary supporting code
to make the exposed types AOT compatible. Since we only need the generator, we can mark this as private.
-->
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.1.6" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
12 changes: 0 additions & 12 deletions src/ComputeSharp.Uwp/ComputeSharp.Uwp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,6 @@
<DefineConstants>$(DefineConstants);WINDOWS_UWP</DefineConstants>
</PropertyGroup>

<PropertyGroup>

<!-- Disable IIDOptimizer, as it's not needed (see comments in ComputeSharp.D2D1.WinUI)-->
<CsWinRTIIDOptimizerOptOut>true</CsWinRTIIDOptimizerOptOut>
</PropertyGroup>

<ItemGroup>

<!-- Reference CsWinRT locally for the source generators (see comments in ComputeSharp.D2D1.WinUI) -->
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.1.6" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\ComputeSharp\ComputeSharp.csproj" />
</ItemGroup>
Expand Down
9 changes: 0 additions & 9 deletions src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,8 @@
<WebView2EnableCsWinRTProjectionExcludeCoreRef>true</WebView2EnableCsWinRTProjectionExcludeCoreRef>
</PropertyGroup>

<PropertyGroup>

<!-- Disable IIDOptimizer, as it's not needed (see comments in ComputeSharp.D2D1.WinUI)-->
<CsWinRTIIDOptimizerOptOut>true</CsWinRTIIDOptimizerOptOut>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.6.240923002" />

<!-- Reference CsWinRT locally for the source generators (see comments in ComputeSharp.D2D1.WinUI) -->
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.1.6" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 30ac237

Please sign in to comment.