Move from .Net 9 to .Net 10 in Maui

Dani_S 4,966 Reputation points
2025-11-19T14:17:54.5066667+00:00

Hi,

I have app in .Net 9 in Maui, how I move to to .Net 10.

Please provides all the steps of upgrades?

Thanks,

Developer technologies | .NET | .NET MAUI
0 comments No comments
{count} votes

Answer accepted by question author
  1. Michael Le (WICLOUD CORPORATION) 7,020 Reputation points Microsoft External Staff Moderator
    2025-11-20T04:34:57.3633333+00:00

    Hello @Dani_S ,

    Since targeting .NET 10 is only officially supported in Visual Studio 2026 and later version, you need to download Visual Studio 2026 from the official Microsoft website: https://visualstudio.microsoft.com/downloads/

    If you are developing for iOS/Mac, you need to install Xcode 26.

    To update your project to target .NET 10, follow these steps:

    1. Open your project in VS 2026.
    2. Open .csproj file.
    3. Change the <TargetFramework> element to net10.0 like this:
          <TargetFrameworks>net10.0-android;net10.0-ios;net10.0-maccatalyst</TargetFrameworks>
          <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net10.0-windows10.0.19041.0</TargetFrameworks>
      
      For Android, while API 21 is still supported in .NET 10, it's recommended to update existing projects to API 24 to avoid unexpected runtime errors.
         <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">24.0</SupportedOSPlatformVersion>
      
    4. Update NuGet packages: Tools > NuGet Package Manager > Manage NuGet Packages for Solution... > Updates tab.User's image
    5. Check workloads and SDKs: Tools > Get Tools and Features to ensure you have the latest .NET 10 SDKs installed, you can check the output of dotnet workload list.User's image
    6. Replace all deprecated APIs in your code, refer to https://learn.microsoft.com/en-us/dotnet/maui/whats-new/dotnet-10?view=net-maui-10.0
    7. Delete bin and obj folders from your project directory.
    8. Rebuild your project: Build > Rebuild Solution.

    I hope this clarifies things.

    3 people found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Q&A Assist
    2025-11-19T14:18:18.5833333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To upgrade your .NET MAUI app from .NET 9 to .NET 10, follow these steps:

    1. Install .NET 10: Ensure that you have .NET 10 installed along with the .NET MAUI workload. You can do this using Visual Studio or the standalone installer.
    2. Update Project File: Open your app's project file (.csproj) and change the Target Framework Monikers (TFMs) from 9 to 10. For example, if your project file currently has:
         <TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst;net9.0-tizen</TargetFrameworks>
      
      Update it to:
         <TargetFrameworks>net10.0-android;net10.0-ios;net10.0-maccatalyst;net10.0-tizen</TargetFrameworks>
      
    3. Update NuGet Packages: If your project references any NuGet packages, ensure that you update them to their .NET 10 versions. This includes packages like Microsoft.Maui.Controls and Microsoft.Extensions.Logging.Debug.
    4. Adjust Build Properties: If your app targets specific platforms like iOS or Mac Catalyst, update the $(SupportedOSPlatformVersion) build properties for these platforms to the appropriate version for .NET 10.
    5. Clean and Rebuild: Before building your upgraded app, delete the bin and obj folders to avoid any conflicts. Then, rebuild your project.
    6. Update XAML Compiler Warnings: If you have any XAML compiler warnings, ensure that you update the relevant build properties in your project file to match any changes in the compiler error codes.
    7. Test Your App: After upgrading, thoroughly test your app to ensure that everything works as expected with the new framework version.

    Following these steps will help you successfully upgrade your .NET MAUI app from .NET 9 to .NET 10.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.