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 <16554748+jmacato@users.noreply.github.com>
  • Loading branch information
2 people authored and grokys committed Jun 3, 2024
1 parent 798efeb commit cbc1946
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 cbc1946

Please sign in to comment.