I am new to .NET and I have been receiving this error:
"The current .NET MAUI package version '9.0.21' requires the .NET MAUI workload version to be at least '9.0.0'. The current .NET MAUI workload version is '8.0.83'."
I tried the things ChatGPT told me, I have also checked the dotnet version and it is "9.0.101". But the issue still persists and the app won't deploy.
Here's what I have tried: "1. Update the .NET MAUI Workload Run the following commands in your terminal or Developer Command Prompt for Visual Studio:
dotnet workload update
dotnet --version If it’s not .NET 8 (e.g., 8.0.x), download and install the latest .NET 8 SDK from the official .NET website.
Open Visual Studio.
Restore packages:
dotnet restore
dotnet workload list
Look for something like:
Copy code maui-windows 9.0.x maui-android 9.0.x maui-ios 9.0.x If the version is incorrect or missing, reinstall the workload:
dotnet workload install maui"
Possible cause: Using .net 8 (LTS) with maui 9.
I was getting the mismatch error, 8.0.83
"The current .NET MAUI package version '9.0.21' requires the .NET MAUI workload version to be at least '9.0.0'. The current .NET MAUI workload version is '8.0.83'."
Even after updating the maui workload + and updating to the latest version of VS 2022.
I didn't realize that maui9 required .net 9, and I have my target Frameworks still set to .net 8.
<TargetFrameworks>net8.0-android</TargetFrameworks>
updating it to
<TargetFrameworks>net9.0-android</TargetFrameworks>
Caused the build to work.