Closed Redth closed 9 months ago
I'm currently encountering this issue on iOS, specifically when building with the macOS-13 vmImage. The build is failing due to an older version of iOS SDK. When can we expect a resolution for this? I have numerous self-created packages that reference iOS 17.0, while the workload the vm is installing is version 16.4. I don't intend to make extensive changes right now. Hoping for a quick fix here!
Encountered today both issues (#20600 and #20591). Workaround works for now.
Workaround is not working for me (on MacOS arm64) I have the following .net skds installed:
I created a folder for each sdk version like this:
{
"sdk": {
"version": "8.0.101",
"rollForward": "disable"
}
}
From each folder I checked installed workloads dotnet workload list
, and if any found, I ran dotnet workload uninstall ...
.
Then from 8.0.101
I ran dotnet workload install maui-mobile
and what I see is:
Welcome to .NET 8.0!
---------------------
SDK Version: 8.0.101
...
Installing workload manifest microsoft.net.sdk.android version 34.0.79...
Installing workload manifest microsoft.net.sdk.ios version 17.2.8022...
Installing workload manifest microsoft.net.sdk.maccatalyst version 17.2.8022...
Installing workload manifest microsoft.net.sdk.macos version 14.2.8022...
Installing workload manifest microsoft.net.sdk.maui version 8.0.6...
Installing workload manifest microsoft.net.sdk.tvos version 17.2.8022...
Installing workload manifest microsoft.net.sdk.aspire version 8.0.0-preview.3.24105.21...
Installing pack Microsoft.AspNetCore.Components.WebView.Maui version 8.0.0-rc.1.9171...
Writing workload pack installation record for Microsoft.AspNetCore.Components.WebView.Maui version 8.0.0-rc.1.9171...
Installing pack Microsoft.Maui.Sdk version 8.0.0-rc.1.9171...
Writing workload pack installation record for Microsoft.Maui.Sdk.net8 version 8.0.0-rc.1.9171...
Installing pack Microsoft.Maui.Sdk version 7.0.92...
Writing workload pack installation record for Microsoft.Maui.Sdk.net7 version 7.0.92...
Installing pack Microsoft.Maui.Graphics version 8.0.0-rc.1.9171...
Writing workload pack installation record for Microsoft.Maui.Graphics version 8.0.0-rc.1.9171...
Installing pack Microsoft.Maui.Resizetizer version 8.0.0-rc.1.9171...
Writing workload pack installation record for Microsoft.Maui.Resizetizer version 8.0.0-rc.1.9171...
Installing pack Microsoft.Maui.Resizetizer.Sdk version 7.0.92...
Writing workload pack installation record for Microsoft.Maui.Resizetizer.Sdk version 7.0.92...
Installing pack Microsoft.Maui.Templates.net8 version 8.0.0-rc.1.9171...
...
See these 7.0.92
and 8.0.0-rc.1.9171
versions?
This is what breaks the situation.
I even tried to delete all installed sdks and
~/.nuget/packages
.My development machine is unusable now, and I don't know how to solve this issue.
To solve the situation I had to remove and reinstall everything:
rm -rf /usr/local/share/dotnet
rm -rf ~/.dotnet
then install .NET 8.0.101 + workload maui-mobile
Skipping NuGet package signature verification.
Installing workload manifest microsoft.net.sdk.android version 34.0.79...
Installing workload manifest microsoft.net.sdk.ios version 17.2.8022...
Installing workload manifest microsoft.net.sdk.maccatalyst version 17.2.8022...
Installing workload manifest microsoft.net.sdk.macos version 14.2.8022...
Installing workload manifest microsoft.net.sdk.maui version 8.0.6...
Installing workload manifest microsoft.net.sdk.tvos version 17.2.8022...
Installing workload manifest microsoft.net.workload.mono.toolchain.current version 8.0.2...
Installing workload manifest microsoft.net.workload.emscripten.current version 8.0.2...
Installing workload manifest microsoft.net.workload.emscripten.net6 version 8.0.2...
Installing workload manifest microsoft.net.workload.emscripten.net7 version 8.0.2...
Installing workload manifest microsoft.net.workload.mono.toolchain.net6 version 8.0.2...
Installing workload manifest microsoft.net.workload.mono.toolchain.net7 version 8.0.2...
Installing workload manifest microsoft.net.sdk.aspire version 8.0.0-preview.3.24105.21...
Installing pack Microsoft.AspNetCore.Components.WebView.Maui version 8.0.6...
Writing workload pack installation record for Microsoft.AspNetCore.Components.WebView.Maui version 8.0.6...
Installing pack Microsoft.Maui.Sdk version 8.0.6...
Writing workload pack installation record for Microsoft.Maui.Sdk.net8 version 8.0.6...
Installing pack Microsoft.Maui.Sdk version 7.0.101...
Writing workload pack installation record for Microsoft.Maui.Sdk.net7 version 7.0.101...
Installing pack Microsoft.Maui.Graphics version 8.0.6...
Writing workload pack installation record for Microsoft.Maui.Graphics version 8.0.6...
Installing pack Microsoft.Maui.Resizetizer version 8.0.6...
Writing workload pack installation record for Microsoft.Maui.Resizetizer version 8.0.6...
Installing pack Microsoft.Maui.Resizetizer.Sdk version 7.0.101...
I have the following .net skds installed:
* 8.101 * 8.102 * 8.200
Does anyone know if 8.102 is affected by this bug as well? (I have verified myself that 8.101 works and 8.200 fails badly.)
My "workaround" was to uninstall the whole shebang (SDK 8.200, I mean). I expect there will be a fixed 8.201 soon?!? This is pretty severe.
@Redth is the version deployed by visual studio affected as well?
I have the following .net skds installed:
* 8.101 * 8.102 * 8.200
Does anyone know if 8.102 is affected by this bug as well? (I have verified myself that 8.101 works and 8.200 fails badly.)
My "workaround" was to uninstall the whole shebang (SDK 8.200, I mean). I expect there will be a fixed 8.201 soon?!? This is pretty severe.
This version is not affected. I ran it yesterday successfully.
@albyrock87's example will work if you ran into this on your local developer machine: https://github.com/dotnet/maui/issues/20600#issuecomment-1945892772
If you are seeing this on Azure DevOps, you can install 8.0.101 or some 8.0.1xx version for now:
- task: UseDotNet@2
inputs:
version: '8.0.101'
We are currently investigating and testing a potential fix and will post an update when we have more to share.
Is this potential fix coming in the near term? I'm trying to figure out if I should just wait for the fix or do the work to revert all of my projects back to 8.0.101. Thanks.
@SteveBush can you try it now, they just shipped a new 8.0.201 .NET SDK, and it worked for me here:
@jonathanpeppers Yes, it is fixed. Working fine on Azure DevOps
I can also confirm that with 8.0.201 one gets proper workload versions again (and the build errors are gone):
% dotnet workload list
Installed Workload Id Manifest Version Installation Source
--------------------------------------------------------------------
maui-maccatalyst 8.0.6/8.0.100 SDK 8.0.200
maui-ios 8.0.6/8.0.100 SDK 8.0.200
maui-android 8.0.6/8.0.100 SDK 8.0.200
maui 8.0.6/8.0.100 SDK 8.0.200
Hi all - apologies, I'm a bit inexperienced with this, how can implement this workaround?
I've got this in the project when i type dotnet workload list
Installed Workload Id Manifest Version Installation Source
--------------------------------------------------------------------
maui-ios 8.0.6/8.0.100 SDK 8.0.200
maui-android 8.0.6/8.0.100 SDK 8.0.200
maui-mobile 8.0.6/8.0.100 SDK 8.0.200
I have this in the sdks:
8.0.100-rc.2.23502.2 [/usr/local/share/dotnet/sdk]
8.0.201 [/usr/local/share/dotnet/sdk]
I can't see an global.json file in my maui solution
Have run a clean and deleted bin and obj but still it is not compiling with the MauiUIApplication delegate error
@ssbssb-cmd there is no need for a workaround anymore. The 8.0.201 .NET SDK installs the latest workloads successfully:
Installing workload manifest microsoft.net.sdk.maui version 8.0.6...
File a new issue, if you are having a different problem, thanks!
With the recent release of the 8.0.200 .NET SDK, there is an issue occurring where installing some workloads (including
maui
) attempts to install an incorrect (older) version of the workload itself. While the workload installation may succeed, subsequently building MAUI apps may fail.This occurs in situations where the SDK was manually installed and workloads installed via command line. Installations through Visual Studio should be unaffected.
We are currently investigating and testing a potential fix and will post an update when we have more to share.
Workaround
You can work around this by installing an older version of .NET SDK (eg: 8.0.101), installing the maui workload in the context of that SDK version, and setting your global.json to use that SDK version as well.