Skip to content

Commit

Permalink
[Sample] Upgrading Maui sample to .NET 9
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyBP committed Dec 9, 2024
1 parent 6817dc3 commit b615b1b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 29 deletions.
25 changes: 12 additions & 13 deletions Apizr/Samples/Apizr.Sample.MAUI/Apizr.Sample.MAUI.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) and '$(MSBuildRuntimeType)' == 'Full'">$(TargetFrameworks);net8.0-windows10.0.19041</TargetFrameworks>
<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) and '$(MSBuildRuntimeType)' == 'Full'">$(TargetFrameworks);net9.0-windows10.0.19041</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->
<!-- <TargetFrameworks>$(TargetFrameworks);net9.0-tizen</TargetFrameworks> -->
<OutputType>Exe</OutputType>
<RootNamespace>Apizr.Sample.MAUI</RootNamespace>
<UseMaui>true</UseMaui>
Expand All @@ -16,18 +16,18 @@
<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">13.1</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">27.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)'=='net8.0-ios'">
<PropertyGroup Condition="'$(TargetFramework)'=='net9.0-ios'">
<CodesignKey>Apple Development: Created via API (Z887M6WDP6)</CodesignKey>
<CodesignProvision>VS: WildCard Development</CodesignProvision>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-ios|AnyCPU'">
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net9.0-ios|AnyCPU'">
<MtouchLink>SdkOnly</MtouchLink>
</PropertyGroup>
<ItemGroup>
Expand Down Expand Up @@ -80,14 +80,13 @@
<ItemGroup>
<PackageReference Include="CommunityToolkit.Maui" Version="9.1.1" />
<PackageReference Include="MetroLog.Maui" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0" />
<PackageReference Include="Prism.DryIoc.Maui" Version="9.0.537" />
<PackageReference Include="Prism.Maui.Rx" Version="9.0.537" />
<PackageReference Include="ReactiveUI.Fody" Version="19.5.41" />
<PackageReference Include="Refit.Newtonsoft.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.90" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.90" />
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.12" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.12" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Src\Apizr.Extensions.Microsoft.DependencyInjection\Apizr.Extensions.Microsoft.DependencyInjection.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using Apizr.Sample.Models;
using Apizr.Transferring.Managing;
using Fusillade;
using IntelliJ.Lang.Annotations;
using MediatR;
using MetroLog.Maui;
using ReactiveUI;
Expand Down
16 changes: 1 addition & 15 deletions Apizr/Samples/Apizr.Sample.MAUI/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"ShouldInvalidateOnError": false
}
},
"IReqResUserService": {
"IReqResService": {
"Caching": {
"Mode": "FetchOrGet",
"LifeSpan": "00:12:00",
Expand All @@ -49,20 +49,6 @@
"HttpGet": [ "TestPipeline3" ]
}
},
"IReqResSimpleService": {
"BaseAddress": "https://reqres.in/api",
"RequestTimeout": "00:00:03",
"Headers": [
"testSettingsKey2: testSettingsValue2.1",
"testSettingsKey3: *testSettingsValue3.1*",
"testSettingsKey4: {0}",
"testSettingsKey5: *{0}*"
],
"ResiliencePipelineOptions": {
"HttpGet": [ "TestPipeline3" ]
}
//"ResiliencePipelineKeys": [ "TestPipeline3" ]
},
"IHttpBinService": {
"BaseAddress": "https://httpbin.org",
"RequestTimeout": "00:00:04",
Expand Down

0 comments on commit b615b1b

Please sign in to comment.