Skip to content

Commit

Permalink
Merge pull request #887 from unoplatform/dev/jela/net9-sdk-warn
Browse files Browse the repository at this point in the history
fix: Adjust .NET 9.0 SDK compatibility, warn on net9.0 incompatibility
  • Loading branch information
jeromelaban authored Sep 7, 2024
2 parents abcb066 + b582eea commit 2630e4b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Uno.Wasm.Bootstrap/build/Uno.Wasm.Bootstrap.targets
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@
<_WasmBootstrapOriginalPublishDir>$(PublishDir)</_WasmBootstrapOriginalPublishDir>
</PropertyGroup>

<PropertyGroup Condition="
'$(TargetFrameworkIdentifier)'=='.NETCoreApp'
AND $([MSBuild]::VersionGreaterThanOrEquals($(NETCoreSdkVersion), '9.0'))">

<!-- .NET 9 SDK Compatibility -->
<EnableDefaultCompressedItems>false</EnableDefaultCompressedItems>
</PropertyGroup>

<Choose>
<When Condition="
'$(WasmShellLinkerPath)'==''
Expand Down Expand Up @@ -191,6 +199,10 @@
Condition="'%(Extension)' == '.dll'" />
</ItemGroup>

<Error
Condition="$([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '9.0')) AND '$(UnoDisableNet9Validation)' != 'true' "
Text="This version of the Uno.Wasm.Bootstrap package does not support the net9.0 target framework and later, starting from the .NET 9.0 SDK Preview 7. The net8.0 TargetFramework is supported." />

<PropertyGroup>
<!-- Defined here because OutputPath is defined late -->
<WasmShellDistPath Condition="'$(WasmShellDistPath)'==''">$([System.IO.Path]::Combine('$(OutputPath)', 'dist'))</WasmShellDistPath>
Expand Down

0 comments on commit 2630e4b

Please sign in to comment.