Skip to content

Commit

Permalink
fix: Fix illinkerpath
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef1313 committed May 15, 2024
1 parent cf22fc7 commit 03056be
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions src/SourceGenerators/Uno.UI.Tasks/Content/Uno.UI.Tasks.targets
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,30 @@

<_IsXamlTrimmingAvailable>true</_IsXamlTrimmingAvailable>
<_IsXamlTrimmingAvailable Condition="'$(MSBuildRuntimeType)'!='Core' and !$([MSBuild]::IsOSPlatform('windows'))">false</_IsXamlTrimmingAvailable>
<_UnoLinkerHintGeneratorILLinkerPath>$(MSBuildThisFileDirectory)\..\tools\linker</_UnoLinkerHintGeneratorILLinkerPath>
</PropertyGroup>

<Choose>
<When Condition="
'$(TargetFrameworkIdentifier)'=='.NETCoreApp'
and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '5.0'))
and '$(ILLinkTasksAssembly)'!=''">

<Choose>
<When Condition="$([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '8.0'))">
<PropertyGroup>
<_UnoLinkerHintGeneratorILLinkerPath>$([System.IO.Path]::GetDirectoryName($(ILLinkTasksAssembly)))\..\net$(TargetFrameworkVersion.Substring(1))</_UnoLinkerHintGeneratorILLinkerPath>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<_UnoLinkerHintGeneratorILLinkerPath>$([System.IO.Path]::GetDirectoryName($(ILLinkTasksAssembly)))\..\net7.0</_UnoLinkerHintGeneratorILLinkerPath>
</PropertyGroup>
</Otherwise>
</Choose>
</When>
</Choose>

<Import Project="uno.ui.tasks.assets.targets"/>

<UsingTask AssemblyFile="$(UnoUIMSBuildTasksPath)\Uno.UI.Tasks.v0.dll" TaskName="Uno.UI.Tasks.LinkerHintsGenerator.LinkerHintGeneratorTask_v0" TaskFactory="TaskHostFactory" />
Expand Down Expand Up @@ -312,16 +334,6 @@
</ItemGroup>

<PropertyGroup>
<_UnoLinkerHintGeneratorILLinkerPath>$(MSBuildThisFileDirectory)\..\tools\linker</_UnoLinkerHintGeneratorILLinkerPath>


<_UnoLinkerHintGeneratorILLinkerPath
Condition="
'$(TargetFrameworkIdentifier)'=='.NETCoreApp'
and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '6.0'))
and '$(ILLinkTasksAssembly)'!=''"
>$([System.IO.Path]::GetDirectoryName($(ILLinkTasksAssembly)))\..\net$(BundledNETCoreAppTargetFrameworkVersion)</_UnoLinkerHintGeneratorILLinkerPath>

<_UnoUIPackageBasePath
Condition="
'%(UnoRuntimeEnabledPackage.Identity)'=='Uno.UI'
Expand Down

0 comments on commit 03056be

Please sign in to comment.