14

.NET MAUI RC1 is available with VS for Mac support

 2 months ago
source link: https://www.banditoth.net/2022/04/21/net-maui-rc1-is-available-with-vs-for-mac-support/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

.NET MAUI RC1 is available with VS for Mac support

April 21, 2022 by banditoth

Good news for .NET MAUI fans. We’ll soon have a stable version from the wonderful developers at Microsoft, but in the meantime, here we have the first RC version of .NET MAUI.
There’s a lot of new features in this version, including integration with the Essentials package, much more customizable styles, etc.
But today I want to talk about the most important thing for me, which is the support for Visual Studio for Mac. Well, it’s not so official yet, and it’s not so usable, but we can see progress. VS for Mac 2022 is no longer a stranger to MAUI projects. Unfortunately, I couldn’t get the debugging to work, but you can now start the project on almost any platform.

Let’s use MAUI in Visual Studio 2022 for Mac

First and most importantly, and I experienced it first hand.
If the IDE you want to use throws the following errors:

/usr/local/share/dotnet/sdk/6.0.202/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(5,5): Error NETSDK1147: To build this project, the following workloads must be installed: maui-maccatalyst
To install these workloads, run the following command: dotnet workload install maui-maccatalyst (NETSDK1147) (ResxEditorMaui)
/usr/local/share/dotnet/sdk/6.0.202/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(5,5): Error NETSDK1147: To build this project, the following workloads must be installed: maui-ios
To install these workloads, run the following command: dotnet workload install maui-ios (NETSDK1147) (ResxEditorMaui)
/usr/local/share/dotnet/sdk/6.0.202/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(5,5): Error NETSDK1147: To build this project, the following workloads must be installed: maui-android
To install these workloads, run the following command: dotnet workload install maui-android (NETSDK1147) (ResxEditorMaui)

And you can’t install the recommended packages because the following error is displayed:

Workload ID android-aot is not recognized.

Then be sure to install .NET version 6.0.3XX. You can do this from this url and select the appropriate processor architecture. https://github.com/dotnet/installer

To check which version is installed, you can check in the terminal with the following paranncs:

dotnet --info

If you have installed the required version of .NET 6.0, issue the following command:

sudo dotnet workload install maui

You can then use MAUI in Visual Studio for Mac.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK