How can I complete the "Build a .NET MAUI app with Azure Mobile Apps" tutorial when "build" complains that "net6.0-android is out of support"?

Jesse Johnson 0 Reputation points
2024-05-13T17:31:14.0733333+00:00

Have installed Visual Studio 2022 Version 17.9.6 including the required workloads. Installed azd version 1.9. Working through the title tutorial. Have met all the prerequisites. I am stumped trying to complete the step "Deploy the backend to Azure". Have logged in to Azure from PCM with az login. When I attempt the azd up command, issued in Package Manager Console, it hangs. When I use "azd up --debug", the 'tail' of the debug report contains: 2024/05/13 12:48:19 project.go:120: Reading project from file 'C:\Users<myuser>\source\repos\azure-mobile-appsmain\samples\TodoApp\azure.yaml'

2024/05/13 12:48:19 hooks.go:52: azd environment is not available, skipping all hook registrations. The pipeline has been stopped.

My "build" command reports "The workload 'net6.0-android' is out of support"; Also it tells me: there are additional errors about 'Platform versions not present for net6.0-ios'. Please offer suggestions on how I might debug this. Thank you. Jesse

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,509 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Jesse Johnson 0 Reputation points
    2024-05-13T19:49:37.1466667+00:00

    Turns out this was caused by a known problem: Multiple Azure logins with the same user_id (email address). https://github.com/Azure/azure-cli/issues/20168

    I discovered this by attempting to issue the command "azd up" at the Windows command line. The error was not reported in Visual Studio 2022 Package Manager Console. The solution to the "multiple Azure accounts" was reported in the GitHub issues/20168:az account clear

    az login