Can't run C# using .NET Core 1.1.0 on Rider: "The specified framework 'Microsoft.NETCore.App', version '1.0.1' was not found."

Answered

I'm trying to run a simple "HelloWorld.cs" program on Rider EAP, details below:

Rider 1.0 EAP
Build #RS-163.12057, built on January 17, 2017
Rider EAP User
Expiration date: February 16, 2017
JRE: 1.8.0_112-release-408-b2 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Microsoft .NET Core Shared Framework Host

Version : 1.1.0
Build : 928f77c4bc3f49d892459992fb6e1d5542cb5e86

 

When I try to run the program I get the following error:

"C:\Program Files\dotnet\dotnet.exe" D:/Documents/Rider/HelloWorld/HelloWorld/bin/Debug/netcoreapp1.0/HelloWorld.dll
The specified framework 'Microsoft.NETCore.App', version '1.0.1' was not found.
- Check application dependencies and target a framework version installed at:
C:\Program Files\dotnet\shared\Microsoft.NETCore.App
- The following versions are installed:
1.1.0
- Alternatively, install the framework version '1.0.1'.

 

Inside Settings > Build, Execution, Deployment > .NET Core I have the following path: "C:\Program Files\dotnet\dotnet.exe". How can I fix that?

3
3 comments

I found a fix, I had to manually go inside the project.json file and change the version to 1.1.0. Now it's working as it should. The file should look like that for .NET Core 1.1.0:

{
"version": "1.1.0-*",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.1.0"
}
},
"imports": "dnxcore50"
}
}
}
0

The above doesn't work for me - I've found that I need to update my project.json with the following two changes:

  • `Microsoft.NETCore.App` `version` to `1.1.0`
  • Set the framework to `netcoreapp1.1`

Then, `dotnet restore`

Altogether, my project.json is:

{
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.1.0"
}
},
"frameworks": {
"netcoreapp1.1": {
"imports": "dnxcore50"
}
}
}
0

This is a common error when using .NET Core. The common misconception is that by specifying "Microsoft.NETCore.App" in project.json you have everything you need to run. In reality, adding this to your project only provides you with enough information to compile for .NET Core 1.x. To run on .NET Core, you need to install the corresponding runtime version. These runtimes can be downloaded here: 

.NET Core 1.0 runtime (LTS) https://www.microsoft.com/net/download/core#/runtime/lts

.NET Core 1.1 runtime (most recent) https://www.microsoft.com/net/download/core#/runtime/current

0

Please sign in to leave a comment.