Arch Linux: "The SDK 'Microsoft.Net.Sdk' specified could not be found."
See original GitHub issueEnvironment data
dotnet --info
output:
.NET Core SDK (reflecting any global.json):
Version: 2.2.102
Commit: 96ff75a873
Runtime Environment:
OS Name: arch
OS Version:
OS Platform: Linux
RID: arch-x64
Base Path: /opt/dotnet/sdk/2.2.102/
Host (useful for support):
Version: 2.2.1
Commit: 878dd11e62
.NET Core SDKs installed:
2.2.102 [/opt/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.NETCore.App 2.2.1 [/opt/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
VS Code version:
1.30.2
C# Extension version:
1.17.1
Steps to reproduce
Create new console project using dotnet new console
, open VSCode either via start menu or command line.
Expected behavior
Projects loads fine
Actual behavior
Omnisharp loads and displays the mentioned issue above.
Workaround
I found at least a workaround to fix this issue when opening VSCode via command line.
Unfortunately I haven’t yet found a way to solve it when starting via start menu.
Fix:
- add environment variable
MSBuildSDKsPath=/opt/dotnet/sdk/2.2.102/Sdks
- open project file, replace
<Project Sdk="Microsoft.Net.Sdk">
with<Project Sdk="Microsoft.NET.Sdk">
(uppercasedNet
)
I’m using Arch Linux with KDE, pretty clean/new system.
Used latest Ubuntu before, no problems at all.
Although the workaround works for now, I guess it will break everytime a different SDK version gets used.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:11 (3 by maintainers)
Top Results From Across the Web
.NET - ArchWiki
NET (previously named .NET Core) is a FOSS software framework from Microsoft for C#, Visual Basic, and F#.
Read more >MSBUILD throws error: The SDK 'Microsoft.NET.Sdk' specified ...
Sdk ' specified could not be found. The version of msbuild is the latest from microsoft visual studio 2017 tools. I'm using Windows...
Read more >The SDK 'Microsoft.NET.Sdk.Web' specified could not be found
Web' specified could not be found. I was using asp.net core version 2.0.6 version and the application was running fine on that version...
Read more >Install .NET Core SDK on Arch Linux using the Snap Store
It is open source and it can share the same code with .NET Framework and Xamarin apps.
Read more >The SDK 'Microsoft.NET.Sdk' specified could not be found
The SDK 'Microsoft.NET.Sdk' specified could not be found ... I have Rider 2020.1 installed on Manjaro linux, using mono 6.4.0 installed using the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Create the file
/etc/profile.d/dotnet.sh
Found here: https://bugs.archlinux.org/task/60903?project=5&string=dotnet-host
this resolved mine https://github.com/dotnet/corefx/issues/41481#issuecomment-555555762