I have added the MAUI workload in Visual Studio 2022 v17.3.0 Preview 1.1 and I have the following set of errors after creating my project.
Errors:
Severity Code Description Project File Line Suppression State Warning NU1505 Duplicate 'PackageDownload' items found. Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior. The duplicate 'PackageDownload' items are: Microsoft.NETCore.App.Host.win-x64 [6.0.3], Microsoft.NETCore.App.Host.win-x64 [6.0.3], Microsoft.NETCore.App.Host.win-x64 [6.0.3], Microsoft.NETCore.App.Host.win-x64 [6.0.3]. MauiApp2 C:\Users\Trevoir\source\repos\MauiApp2\MauiApp2\MauiApp2.csproj 1
Error NU1012 Platform version is not present for one or more target frameworks, even though they have specified a platform: net6.0-android, net6.0-ios, net6.0-maccatalyst MauiApp2 C:\Users\Trevoir\source\repos\MauiApp2\MauiApp2\MauiApp2.csproj 1
Error NU1012 Platform version is not present for one or more target frameworks, even though they have specified a platform: net6.0-android, net6.0-ios, net6.0-maccatalyst MauiApp2 C:\Users\Trevoir\source\repos\MauiApp2\MauiApp2\MauiApp2.csproj 1
Error NU1012 Platform version is not present for one or more target frameworks, even though they have specified a platform: net6.0-android, net6.0-ios, net6.0-maccatalyst MauiApp2 C:\Users\Trevoir\source\repos\MauiApp2\MauiApp2\MauiApp2.csproj 1
Error NU1012 Platform version is not present for one or more target frameworks, even though they have specified a platform: net6.0-android, net6.0-ios, net6.0-maccatalyst MauiApp2 C:\Users\Trevoir\source\repos\MauiApp2\MauiApp2\MauiApp2.csproj 1
Error NETSDK1139 The target platform identifier android was not recognized. MauiApp2 C:\Program Files\dotnet\sdk\7.0.100-preview.3.22179.4\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets 112 Error NETSDK1139 The target platform identifier ios was not recognized. MauiApp2 C:\Program Files\dotnet\sdk\7.0.100-preview.3.22179.4\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets 112 Error NETSDK1139 The target platform identifier maccatalyst was not recognized. MauiApp2 C:\Program Files\dotnet\sdk\7.0.100-preview.3.22179.4\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets 112
I have done the maui-check and it always ends with the following:
.NET SDK - Workloads (6.0.200) Checkup... x android-aot (Microsoft.NET.Sdk.Android.Manifest-6.0.200 : 31.0.200-preview.12.2) not installed. x ios (Microsoft.NET.Sdk.iOS.Manifest-6.0.200 : 15.2.200-preview.12.4) not installed. x maccatalyst (Microsoft.NET.Sdk.MacCatalyst.Manifest-6.0.200 : 15.2.200-preview.12.4) not installed. x tvos (Microsoft.NET.Sdk.tvOS.Manifest-6.0.200 : 15.2.200-preview.12.4) not installed. x macos (Microsoft.NET.Sdk.macOS.Manifest-6.0.200 : 12.1.200-preview.12.4) not installed. x maui (Microsoft.NET.Sdk.Maui.Manifest-6.0.200 : 6.0.200-preview.12.2441) not installed. ! Managing Workload installation from the CLI is NOT recommended. Instead you should install the latest Visual Studio preview to automatically get the newest release of .NET MAUI workloads installed.
2条答案
按热度按时间r1zk6ea11#
在电脑上:恕我直言,不要运行毛伊岛。也不要用任何“旧”的方式安装毛伊岛的工作负载。
(On Mac,VS 17.3.0预览版1.1仍然需要一个命令行步骤的Android。
我建议重新开始。
wecizke32#
我可以通过在包含**.csproj**文件的文件夹中运行以下命令来使其工作。