Skip to content

Commit

Permalink
Add MAUI control packages when targeting .NET 8
Browse files Browse the repository at this point in the history
  • Loading branch information
dotMorten committed Nov 12, 2023
1 parent 7c0b0b7 commit bd16417
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/CommonProperties.targets
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<DefineConstants Condition="$([MSBuild]::IsTargetFrameworkCompatible($(TargetFramework), 'net5.0'))">$(DefineConstants);NET5_0_OR_GREATER</DefineConstants>
<DefineConstants Condition="$([MSBuild]::IsTargetFrameworkCompatible($(TargetFramework), 'net6.0'))">$(DefineConstants);NET6_0_OR_GREATER</DefineConstants>
<DefineConstants Condition="$([MSBuild]::IsTargetFrameworkCompatible($(TargetFramework), 'net7.0'))">$(DefineConstants);NET7_0_OR_GREATER</DefineConstants>
<DefineConstants Condition="$([MSBuild]::IsTargetFrameworkCompatible($(TargetFramework), 'net8.0'))">$(DefineConstants);NET8_0_OR_GREATER</DefineConstants>
<DefineConstants Condition="'$(IsTargetingWindows)'=='true'">$(DefineConstants);WINDOWS</DefineConstants>
<DefineConstants Condition="'$(IsTargetingAndroid)'=='true' OR '$(IsTargetingiOS)'=='true'">$(DefineConstants);XAMARIN</DefineConstants>
<Nullable Condition="'$(SupportsNullable)'=='true'">enable</Nullable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,11 @@
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.1" />
</ItemGroup>

<ItemGroup>
<MauiXaml Update="Samples\GeoViewControllerSample.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible($(TargetFramework), 'net8.0'))">
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
</ItemGroup>


<Choose>
<When Condition="'$(UseNugetPackage)'==''">
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@
<ProjectReference Include="..\Toolkit.WinUI\Esri.ArcGISRuntime.Toolkit.WinUI.csproj" Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'" />
</ItemGroup>

<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible($(TargetFramework), 'net8.0'))">
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
</ItemGroup>

<Import Project="..\..\CommonProperties.targets" />
<Import Project="..\Toolkit\Esri.ArcGISRuntime.Toolkit.Shared.projitems" Label="Shared" />
<Import Project="$(SolutionDir)toolkit.props" Condition="Exists('$(SolutionDir)toolkit.props')" />
Expand Down

0 comments on commit bd16417

Please sign in to comment.