SDK package not found "Microsoft.NET.SDK.WorkloadAutoImportPropsLocator". in MACOS

Taalaibek Zhamanbai uulu 11 Reputation points
2021-07-16T06:08:49.48+00:00

SDK package not found "Microsoft.NET.SDK.WorkloadAutoImportPropsLocator". in MACOS. Can you help me?

=== Visual Studio Community 2019 for Mac ===

Version 8.10.6 (build 10)
Installation UUID: 45bdc5bf-ffab-4f7e-a906-1bf30f23203a
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638)

Package version: 612000140

=== Mono Framework MDK ===

Runtime:
Mono 6.12.0.140 (2020-02/51d876a041e) (64-bit)
Package version: 612000140

=== Roslyn (Language Service) ===

3.10.0-4.21269.26+029847714208ebe49668667c60ea5b0a294e0fcb

=== NuGet ===

Версия: 5.9.0.7134

=== Пакет SDK для .NET Core ===

SDK: /usr/local/share/dotnet/sdk/6.0.100-preview.6.21355.2/Sdks
Версии пакета SDK:
6.0.100-preview.4.21255.9
5.0.302
5.0.301
5.0.203
3.1.411
3.1.410
3.1.409
Пакеты MSBuild SDK: /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/MSBuild/Current/bin/Sdks

=== Среда выполнения .NET Core ===

Среда выполнения: /usr/local/share/dotnet/dotnet
Версии среды выполнения:
6.0.0-preview.6.21352.12
5.0.8
5.0.7
5.0.6
3.1.17
3.1.16
3.1.15

=== Пакет SDK для .NET Core 3.1 ===

SDK: 3.1.411

=== Xamarin.Profiler ===

Версия: 1.6.15.68
Расположение: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Updater ===

Версия: 11

=== Apple Developer Tools ===

Xcode 12.5.1 (18212)
Build 12E507

=== Xamarin.Mac ===

Version: 7.14.0.24 (Visual Studio Community)
Hash: c4b89cddb
Branch: d16-10
Build date: 2021-06-15 22:03:00-0400

=== Xamarin.iOS ===

Version: 14.20.0.24 (Visual Studio Community)
Hash: c4b89cddb
Branch: d16-10
Build date: 2021-06-15 22:03:01-0400

=== Xamarin Designer ===

Version: 16.10.0.119
Hash: 36a2d986f
Branch: remotes/origin/d16-10
Build date: 2021-06-02 19:41:34 UTC

=== Xamarin.Android ===

Версия: 11.3.0.4 (Visual Studio Community)
Фиксация: xamarin-android/d16-10/ae14caf
Android SDK: /Users/taalaibek/Library/Developer/Xamarin/android-sdk-macosx
Поддерживаемые версии Android:
Не установлены

Версия SDK Tools: 26.1.1
Версия инструментов платформы SDK: 30.0.4
Версия инструментов сборки SDK: 30.0.2

Сведения о сборке:
Mono: b4a3858
Java.Interop: xamarin/java.interop/d16-10@f39db25
ProGuard: Guardsquare/proguard/v7.0.1@912d149
SQLite: xamarin/sqlite/3.35.4@85460d3
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-10@c5732a0

=== Microsoft OpenJDK for Mobile ===

Java SDK: /Users/taalaibek/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25
1.8.0-25
Код EPL для Android Designer доступен здесь:
https://github.com/xamarin/AndroidDesigner.EPL

=== Android SDK Manager ===

Version: 16.10.0.12
Hash: e240b8c
Branch: remotes/origin/d16-10
Build date: 2021-06-01 18:26:34 UTC

=== Android Device Manager ===

Version: 16.10.0.14
Hash: e340248
Branch: remotes/origin/d16-10
Build date: 2021-06-01 18:26:52 UTC

=== Build Information ===

Release ID: 810060010
Git revision: 263d2fc9398e8092c231fa5d310cd72205cd627c
Build date: 2021-07-08 14:37:29-04
Build branch: release-8.10

=== Operating System ===

Mac OS X 10.16.0
Darwin 20.5.0 Darwin Kernel Version 20.5.0
Sat May 8 05:10:33 PDT 2021
root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64

=== Enabled user installed extensions ===

NuGet Package Management Extensions 0.27

Community Center Not monitored
{count} vote

4 answers

Sort by: Most helpful
  1. Shibu Thannikkunnath 16 Reputation points
    2021-10-19T00:45:30.117+00:00

    I had the same issue with VS 2022 for MAC preview. It looks like it is an issue with net 6. https://github.com/dotnet/core/blob/main/release-notes/6.0/known-issues.md#preview-5

    A workaround is to remove the sdk-manifests directory /usr/local/share/dotnet/sdk-manifests/6.0.100 and then install the .NET 6 preview sdk again.

    ref: https://developercommunity.visualstudio.com/t/monodevelopcoreuserexception-unable-to-find-sdk-mi/1459162#T-N1460014

    3 people found this answer helpful.

  2. Benjamin Alan Askren (TMNA) 11 Reputation points
    2022-05-25T14:08:02.717+00:00

    Upon install of VS2022 (v17.0 - build8989) on x64 Mac, I got this error but did not get this error when building from command line.

    Things tried to fix this:

    • Followed the above instructions (multiple times)
    • deleted (3x) every trace of Mono, Xamarin, NuGet, DotNet, and VisualStudio from my system and reinstalled VS2022
    • Setting the MSBuildEnableWorkloadResolver = false environment variable
    • lots of reboots

    None of the above worked. What was I missing? I was setting the MSBuildEnableWorkloadResolver = false environment variable the wrong way.

    If you turn on Diagnostic log verbosity, the first thing listed in the build log will be the environment variables used for the build. The way that I was trying to set this environment variable was not effecting VisualStudio!

    After a little bit of research, I learned that the most systemic way to set environment variables in MacOS is through launchctl:

    % launchctl setenv MSBuildEnableWorkloadResolver false
    

    The old approach of systemically setting environmental variables was via ~/.MacOSX/environment.plist . However, that approach was removed in OS X Lion. Setting environment variables in the traditional Unix way (.profile, .bash_profile, .zprofile, .zshenv, etc) only applies to shells and will not work for applications.

    2 people found this answer helpful.

  3. DAVIS JIMENEZ PETER ALEXANDER 20 Reputation points
    2024-12-19T16:32:09.4433333+00:00

    Same issue on Mac 14.7.1, Visual Studio 17.6.14, fixed by removing .Net 8.0.404 and staying on 8.0.403.

    sdk -> 8.0.403 (my latest)

    sdk-manifests -> 8.0.100 (my latest)

    I didn't need to remove any 6.x

    0 comments No comments

  4. shalin 0 Reputation points
    2025-01-15T06:21:31.1533333+00:00

    The Xamarin forms project didn't load with this message.

    • Visual studio - 17.6.14 (build 413)

    This happened to me after the workload was restored, possibly due to the .NET 8 update.

    1. Check the dotnet version (dotnet --version)
    2. If the .Net version is 8.0.401 or higher, remove it (use the dot net uninstall tool) - sudo ./dotnet-core-uninstall remove 8.0.401 --SDK (with elevated permission)
    3. dotnet version fallback to 8.9.204 - project loads and running

    Maybe the MAUI project stopped working - will update

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.