Skip to content

Commit 56e0806

Browse files
committed
fix: Add FrameworkReference to winui projects
1 parent 21bec6f commit 56e0806

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

src/SolutionTemplate/Uno.ProjectTemplates.Dotnet/content/unoapp-winui-net6/UnoWinUIQuickStart.Windows/UnoWinUIQuickStart.Windows.csproj

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,19 @@
4545
<ProjectCapability Include="Msix"/>
4646
</ItemGroup>
4747

48+
<ItemGroup>
49+
<!--
50+
If you encounter this error message:
51+
52+
error NETSDK1148: A referenced assembly was compiled using a newer version of Microsoft.Windows.SDK.NET.dll. Please update to a newer .NET SDK in order to reference this assembly.
53+
54+
This means that the two packages below must be aligned with the "build" version number of
55+
the "Microsoft.Windows.SDK.BuildTools" package above, and the "revision" version number
56+
must be the highest found in https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref.
57+
-->
58+
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" RuntimeFrameworkVersion="10.0.22000.25" />
59+
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.22000.25" />
60+
</ItemGroup>
61+
4862
<Import Project="..\UnoWinUIQuickStart.Shared\UnoWinUIQuickStart.Shared.projitems" Label="Shared" />
4963
</Project>

src/SolutionTemplate/UnoSolutionTemplate.WinUI.net6/WinUI/UnoQuickStart.Windows.csproj

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,20 @@
3737
<ItemGroup Condition="'$(DisableMsixProjectCapabilityAddedByProject)'!='true' and '$(EnablePreviewMsixTooling)'=='true'">
3838
<ProjectCapability Include="Msix"/>
3939
</ItemGroup>
40+
41+
<ItemGroup>
42+
<!--
43+
If you encounter this error message:
44+
45+
error NETSDK1148: A referenced assembly was compiled using a newer version of Microsoft.Windows.SDK.NET.dll. Please update to a newer .NET SDK in order to reference this assembly.
4046
47+
This means that the two packages below must be aligned with the "build" version number of
48+
the "Microsoft.Windows.SDK.BuildTools" package above, and the "revision" version number
49+
must be the highest found in https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref.
50+
-->
51+
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" RuntimeFrameworkVersion="10.0.22000.25" />
52+
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.22000.25" />
53+
</ItemGroup>
54+
4155
<Import Project="..\$ext_safeprojectname$.Shared\$ext_safeprojectname$.Shared.projitems" Label="Shared" />
4256
</Project>

0 commit comments

Comments
 (0)