Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NETSDK1139 when restoring any macOS project #135

Closed
wjk opened this issue Apr 17, 2021 · 8 comments
Closed

NETSDK1139 when restoring any macOS project #135

wjk opened this issue Apr 17, 2021 · 8 comments

Comments

@wjk
Copy link

wjk commented Apr 17, 2021

I have version 6.0.100-preview.3.21202.5 of the .NET SDK installed. I have created a sample project using the dotnet new macos -o macos_test command. But when I run dotnet restore on that project, I get the following error (wrapped for readability):

/usr/local/share/dotnet/sdk/6.0.100-preview.3.21202.5/Sdks/Microsoft.NET.Sdk/
targets/Microsoft.NET.TargetFrameworkInference.targets(109,5): error NETSDK1139:
The target platform identifier macos was not recognized.
[/Volumes/Sources/AvaloniaTest/AvaloniaTest/AvaloniaTest.csproj]

This occurs on any project using that TFM. What can be done about this?


msbuild.binlog

dotnet --info output:

.NET SDK (reflecting any global.json):
 Version:   6.0.100-preview.3.21202.5
 Commit:    aee38a6dd4

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  11.2
 OS Platform: Darwin
 RID:         osx.11.0-x64
 Base Path:   /usr/local/share/dotnet/sdk/6.0.100-preview.3.21202.5/

Host (useful for support):
  Version: 6.0.0-preview.3.21201.4
  Commit:  236cb21e3c

.NET SDKs installed:
  5.0.202 [/usr/local/share/dotnet/sdk]
  6.0.100-preview.3.21202.5 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 5.0.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.0-preview.3.21201.13 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 5.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.0-preview.3.21201.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download
@Divyeshpatel6073
Copy link

I have also same issue
But i am using windows 10

error NETSDK1139: The target platform identifier ios was not recognized.

@jonathanpeppers
Copy link
Member

@wjk do you have this file:

__EnableWorkloadResolverSentinelPath = /usr/local/share/dotnet/sdk/6.0.100-preview.3.21202.5/EnableWorkloadResolver.sentinel

If not, just create it (it is a feature flag). The Android workload creates this file for you, but the other workloads don't. We should hopefully be removing the need for it completely in the next preview.

@Divyeshpatel6073 your issue might be the same, but you would need to check the build log to know what file it's looking for.

@wjk
Copy link
Author

wjk commented Apr 19, 2021

@jonathanpeppers Worked great! Thanks!

@Divyeshpatel6073
Copy link

@jonathanpeppers where am i check build log file?

@jonathanpeppers
Copy link
Member

@Divyeshpatel6073 if you are running dotnet build at the command-line it is probably:

C:\Program Files\dotnet\sdk\6.0.100-preview.3.21202.5\EnableWorkloadResolver.sentinel

You could also try installing the Android workload to see if that fixes it for you.

@Divyeshpatel6073
Copy link

Now getting this error

image

@jonathanpeppers
Copy link
Member

@Divyeshpatel6073 can you file a new issue? Add -bl to your command and attach the msbuild.binlog file it creates. Thanks!

@Divyeshpatel6073
Copy link

@jonathanpeppers
hello sir I have to create a new issue
please check it
NETSDK1139 when restoring my project #136

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants