maui: Pre11, Visual Studio 2022 Mac- "The application has not been built" error

Description

I’m seeing an error when attempting to build and run the MauiPreview app in Mac VS 2022 Preview. This issue happens with both iOS and Android. The error is as follows and displays in a modal The application has not been built

The build output shows that the build succeeded. Here is that output:

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:08.74

========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

I am confident I have the proper workload and configuration installed because I can start the app using the CLI command of dotnet build -t:Run -f net6.0-ios /p:_DeviceName=:v2:udid=<UDID>

i’m running:

  • VS Mac 2022
  • Xcode 13.2.1

Steps to Reproduce

  1. install vs 2022 preview on Mac Monterey (preview 11)
  2. install the Maui workload - latest
  3. dotnet new maui
  4. open app in VS
  5. select simulator from the target dropdown. Click start
  6. See error
  7. Verify the app runs in CLI by using dotnet build -t:Run -f net6.0-ios /p:_DeviceName=:v2:udid=<UDID>

Version with bug

Preview 11

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android, I was not able test on other platforms

Affected platform versions

ios 15.2, android 11

Did you find any workaround?

No.

Relevant log output

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 16 (1 by maintainers)

Most upvoted comments

Visual Studio for Mac does not have support for .NET MAUI at this time. Keep your eye on their releases for when it’s there! For now you can run the apps through the command-line or use the Comet VS Code extension to make your life a bit easier 😃

@vniehues I updated my dotnet workflow and maui and I’m now able to deploy to my mac and see code changes reflected. I’m not able to deploy to my iOS sim still. Also, my VS 2022 Mac locks up immediately after attempting to deploy. I’m also getting the ole project.assets.json doesn’t have a target for ‘net6.0-ios’. I’ve already tried reinstalling VS. I guess no Maui for me.

Edit: I’ve removed and reinstalled VS 2022 for mac. I’m not able to compile and deploy to the sim!