Skip to content

Commit

Permalink
Fixed NativeAOT on .NET 9 (#15705)
Browse files Browse the repository at this point in the history
Co-authored-by: Jumar Macato <[email protected]>
  • Loading branch information
MrJul and jmacato authored May 14, 2024
1 parent e4e22ae commit cfcc964
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/Avalonia/AvaloniaBuildTasks.targets
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,16 @@
</ItemGroup>
</Target>

<!-- For some reason the IL Compiler hardcodes $(IntermediateOutputPath)$(TargetName)$(TargetExt) instead of using @(IntermediateAssembly), change that to our assembly. -->
<!--
For some reason the IL Compiler hardcodes $(IntermediateOutputPath)$(TargetName)$(TargetExt)
instead of using @(IntermediateAssembly), change that to our assembly.
This is fixed in .NET 9.0 (https://github.com/dotnet/runtime/pull/99732)
-->
<Target Name="InjectIlcAvaloniaXamlOutput"
DependsOnTargets="InjectAvaloniaXamlOutput"
AfterTargets="ComputeIlcCompileInputs"
BeforeTargets="PrepareForILLink"
Condition="'@(AvaloniaResource)@(AvaloniaXaml)' != '' AND $(EnableAvaloniaXamlCompilation) != false">
Condition="$([MSBuild]::VersionLessThan($(TargetFrameworkVersion), '9.0')) AND '@(AvaloniaResource)@(AvaloniaXaml)' != '' AND $(EnableAvaloniaXamlCompilation) != false">
<ItemGroup>
<ManagedBinary Remove="$(IntermediateOutputPath)$(TargetName)$(TargetExt)" />
<ManagedBinary Include="@(_AvaloniaXamlCompiledAssembly)" />
Expand Down

0 comments on commit cfcc964

Please sign in to comment.