There is a bug in Visual Studio for mac when you are switching a runtime.
Call this command in Visual Studio's terminal for solution:
dotnet restore --packages .nuget --runtime iossimulator-x64
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I have just downloaded Visual Studio for Mac PRE 17.3 (Build 1038) but when I try to run the default MAUI app on iPhone device I get below error:
/usr/local/share/dotnet/sdk/6.0.301/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(5,5): Error NETSDK1047: Assets file '/Users/jassim/Projects/Wink/Wink/obj/project.assets.json' doesn't have a target for 'net6.0-ios/iossimulator-x64'. Ensure that restore has run and that you have included 'net6.0-ios' in the TargetFrameworks for your project. You may also need to include 'iossimulator-x64' in your project's RuntimeIdentifiers. (NETSDK1047) (Wink)
There is a bug in Visual Studio for mac when you are switching a runtime.
Call this command in Visual Studio's terminal for solution:
dotnet restore --packages .nuget --runtime iossimulator-x64
you should be using visual studio for Mac build 17.6.12 (lastest from the stable channel).
note: Visual Studio Mac supports ends 8/31/2024 and net 6 supports ends 11/12/2024. You should upgrade the project to net 8 and pick your replacement for Visual Studio.