So I\'m using Rider without Visual Studio installed and its working fine for .NET but for .NET Core I\'m getting the error:
Project \'Test2\' load fai
@alphaaxmet
You're using a custom MSBuild version
Check your MSBuildSDKsPath
env. variable, it should be equal to the path with your latest .net core sdk , e.g.: C:\Program Files\dotnet\sdk\2.1.302
Thanks to @Damir Beylkhanov 's and @Jura Gorohovsky 's answer, If you are experiencing The Specified SDK “Microsoft.NET.Sdk” was not Found error and you have installed JetBrains Rider 2019 or JetBrains Rider 2020 and Dot NET Core 3.1 on Windows 10 64 bit, see below instructions on How to Fix that;
You will need to use the MSBuild that comes with Dot NET Core 3.1 instead of the one that is provided by your installed Dot NET Runtime 3.x or 4.x
So here is how to locate and add the MSBuild that is needed for your Rider Jetbreains IDE if you are using Dot NET Core 3.1.
I was working with a Windows 10 64 bit OS and JetBrains Rider 2019.2.3 I do not know if this is How it works for other Windows platforms or previous versions of JetBrains Rider.
For 64 bit based Windows 10, after you install Dot NET Core 3.1 , your MSBuild.dll will be in this path C:\Program Files\dotnet\sdk\3.1.100
You may also consider adding the path C:\Program Files\dotnet\sdk\3.1.100 to your environment variables.
So here is How to do it.
Click Tools -> Settings in JetBrains Rider 2019.2.3
Scroll down and locate Build, Execution, Deployment click on it to expand it.
Scroll down and locate Toolset and Build then click on it to open it.
Once you have opened Toolset and Build, find below the option for editing Use MSBuild version and click the Custom button to the right to browse for the MS Build you want to use.
Browse to the path where your Dot NET Core 3.1 is installed and select the MSBuild dll file there. In my case it was this path C:\Program Files\dotnet\sdk\3.1.100.
Once you have selected the MSBuild.dll that installed with your Dot NET Core 3.1, click OK and OK any other open windows then run your Project again. It should work fine now.
See below screenshot for where circled in red to follow through the same process as I did it on my JetBrains Rider IDE. The same screenshot herein also shows the path for MSBuild.dll in my Windows Desktop Computer.
I was getting this error when trying to load projects targetting .NET core (Project Sdk property Microsoft.NET.Sdk). My environment at the time of this issue was as follows:
Rider was able to open the project and solution absolutely fine, although VS 2019 kept complaining about missing SDK. This was a solution with 2 projects both with SDK as Microsoft.NET.Sdk. I then opened a solution that had a web project in it in VS 2019 i.e. Microsoft.NET.Sdk.Web. VS 2019 showed a prompt that said that I needed additional workloads to be installed. When I clicked ok, VS Installer launched and automatically selected "ASP.NET and web development" under workloads. After the installation finished, the web project opened fine but the project with Microsoft.NET.Sdk as the SDK continued to complain about missing SDK.
On further research, I came across this github issue where @akshita31 recommended installing .NET core build tools. Following this:
I had this same error using the build tools docker container which only installs the azure build tools workload - not the netcore build tools required for Microsoft.Net.Sdk
projects.
The fix for me was to add the Component ID Workload for NetCore Build Tools to the dockerfile
config
RUN C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache `
--installPath C:\BuildTools `
--add Microsoft.VisualStudio.Workload.AzureBuildTools `
# <append the line below>
--add Microsoft.VisualStudio.Workload.NetCoreBuildTools `