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

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
25,377 questions
1 vote

3 answers

Sort by: Most helpful
  1. Shibu Thannikkunnath 11 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

    2 people found this answer helpful.

  2. Benjamin Alan Askren (TMNA) 6 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.

    1 person found this answer helpful.

  3. Frank A. Krueger 1 Reputation point
    2021-10-07T20:06:01.517+00:00

    I have the same problem.

    Visual Studio Enterprise 2022 for Mac Preview
    Version 17.0 Preview (17.0 build 3581)
    Installation UUID: 25e23d4c-9421-4278-889a-3bd9d75b5111
    GTK+ 2.24.23

    Mono Framework MDK
    Runtime:
    Mono 6.12.0 (2020-02/3cf59ad33da) (64-bit)
    Package version: 612000147

    Roslyn (Language Service)
    4.0.0-4.21431.22+ef43e6320233f2e8355134e6f3e28a11dc1cbd07

    NuGet
    Version: 6.0.0.220

    .NET SDK
    SDK: /usr/local/share/dotnet/sdk/6.0.100-rc.1.21463.6/Sdks
    SDK Versions:
    6.0.100-rc.1.21463.6
    6.0.100-preview.4.21255.9
    5.0.401
    5.0.400
    5.0.203
    5.0.102
    5.0.100
    3.1.413
    3.1.412
    3.1.409
    3.1.405
    3.1.404
    MSBuild SDKs: /Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Sdks

    .NET Core Runtime
    Runtime: /usr/local/share/dotnet/dotnet
    Runtime Versions:
    6.0.0-rc.1.21451.13
    6.0.0-preview.4.21253.7
    5.0.10
    5.0.9
    5.0.6
    5.0.2
    5.0.0
    3.1.19
    3.1.18
    3.1.15
    3.1.11
    3.1.10

    .NET 5.0 SDK
    SDK: 5.0.401

    .NET Core 3.1 SDK
    SDK: 3.1.413

    Xamarin.Profiler
    Version: 1.6.15.68
    Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

    Updater
    Version: 12

    Xamarin Designer
    Version: 17.0.0.103
    Hash: 295adb804
    Branch: remotes/origin/main
    Build date: 2021-09-27 18:28:12 UTC

    Apple Developer Tools
    Xcode 13.0 (19234)
    Build 13A233

    Xamarin.Mac
    Version: 7.14.0.27 (Visual Studio Enterprise)
    Hash: 2566861a9
    Branch: d16-10
    Build date: 2021-07-27 02:34:12-0400

    Xamarin.iOS
    Version: 15.0.0.6 (Visual Studio Enterprise)
    Hash: 2771277e0
    Branch: xcode13-ios
    Build date: 2021-09-23 10:36:08-0400

    Xamarin.Android
    Version: 12.0.99.16 (Visual Studio Enterprise)
    Commit: xamarin-android/main/8fa383d
    Android SDK: /Users/fak/Library/Android/sdk
    Supported Android versions:
    None installed

    SDK Tools Version: 26.1.1
    SDK Platform Tools Version: 31.0.2
    SDK Build Tools Version: 30.0.3

    Build Information:
    Mono: c633fe9
    Java.Interop: xamarin/java.interop/main@b7982e4
    ProGuard: Guardsquare/proguard/v7.0.1@912d149
    SQLite: xamarin/sqlite/3.36.0@a575761
    Xamarin.Android Tools: xamarin/xamarin-android-tools/main@9b658b2

    Microsoft OpenJDK for Mobile
    Java SDK: /Library/Java/JavaVirtualMachines/microsoft-11.jdk/Contents/Home
    2021-01-19
    Android Designer EPL code available here:
    https://github.com/xamarin/AndroidDesigner.EPL

    Android SDK Manager
    Version: 17.0.0.17
    Hash: 684bb15
    Branch: remotes/origin/d17-0~1
    Build date: 2021-09-27 18:28:15 UTC

    Android Device Manager
    Version: 17.0.0.12
    Hash: d7b346d
    Branch: remotes/origin/d17-0
    Build date: 2021-09-27 18:28:15 UTC

    Build Information
    Release ID: 1700003581
    Git revision: 1a01aab548b977f5570a7b49de26470dc5dded56
    Build date: 2021-09-27 14:27:04-04
    Build branch: release-17.0

    Operating System
    Mac OS X 12.0.0
    Darwin 21.0.0 Darwin Kernel Version 21.0.0
    Mon Aug 2 00:18:13 PDT 2021
    root:xnu-8019.30.9~9/RELEASE_ARM64_T8101 x86_64