Could not resolve coreclr path

See original GitHub issue

My project.json file looks like below:

{
    "version": "0.0.0",
    "compilationOptions": {
        "emitEntryPoint": true
    },
    "dependencies": {
        "BonVoyage": "*"
    },
    "frameworks": {
        "netcoreapp1.0": {
            "imports": [
                "portable-net45+wp80+win8+wpa81+dnxcore50"
            ]
        }
    }
}

when I run dotnet run after running dotnet restore --no-cache, I am getting the below error:

$ dotnet run
Can not find runtime target for framework '.NETCoreApp,Version=v1.0' compatible with one of the target runtimes: 'ubuntu.14.04-x64'. Possible causes:
The project has not been restored or restore failed - run dotnet restore
The project does not list one of 'ubuntu.14.04-x64' in the 'runtimes' section.

I added the runtime and did another restore:

{
    "version": "0.0.0",
    "compilationOptions": {
        "emitEntryPoint": true
    },
    "dependencies": {
        "BonVoyage": "*"
    },
    "frameworks": {
        "netcoreapp1.0": {
            "imports": [
                "portable-net45+wp80+win8+wpa81+dnxcore50"
            ]
        }
    },
    "runtimes": {
        "ubuntu.14.04-x64": {}
    }
}

now I am getting this:

$ dotnet run
Project BonVoyage (.NETStandard,Version=v1.1) was previously compiled. Skipping compilation.
Compiling Foo.Sync for .NETCoreApp,Version=v1.0
/home/tugberk/apps/Foo/src/Foo.Sync/project.json(7,25): warning NU1007: Dependency specified was BonVoyage >= * but ended up with BonVoyage 0.0.0-0.

Compilation succeeded.
    1 Warning(s)
    0 Error(s)

Time elapsed 00:00:04.7361717


Could not resolve coreclr path

Not sure about a few things:

  • why do I need to specify the runtime inside the project.json file? I expected to do this through the global.json file.
  • why am I getting this error?

Environment data

dotnet --info output:

$ dotnet --info
.NET Command Line Tools (1.0.0-rc2-002416)

Product Information:
 Version:     1.0.0-rc2-002416
 Commit Sha:  37f00f24e9

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  14.04
 OS Platform: Linux
 RID:         ubuntu.14.04-x64

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:18 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
davidfowlcommented, Apr 24, 2016

The error messages are pretty horrible overall but @schellap has been tackling them one by one. It would be great if the error told you, what the available versions were as well.

https://github.com/dotnet/cli/pull/2648/files

1reaction
schellapcommented, May 11, 2016

Just closing the loop on this one… the error message was improved since https://github.com/dotnet/cli/pull/2709.

The escrow builds displays this message.

The targeted framework { 'Microsoft.NETCore.App': '1.0.0-rc9-3002543' } was not found.
  - Check application dependencies and target a framework version installed at:
      H:\Chrome Downloads\shared\Microsoft.NETCore.App
  - The following versions are installed:
      1.0.0-rc2-3002700
  - Alternatively, install the framework version '1.0.0-rc9-3002543'.
Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not resolve CoreCLR path in ubuntu 20.04
Could not resolve CoreCLR path. For more details, enable tracing by setting COREHOST_TRACE environment variable to 1.
Read more >
CoreCLR path · Issue #4825 · dotnet/core
When I try to create an application through "dotnet console -o name". I get an error like "Could not resolve CoreCLR path. For...
Read more >
DotNet Error with nscripthelper - Could not resolve ...
I have built a new PC with Win 10 x64 20H2 and NextPvr from the website. nscripthelper fails with the message 'Could not...
Read more >
NUNIT unable to load test cases. Could not resolve ...
2\win8-x64'. Failed to run as a self-contained app. If this should be a framework-dependent app, add the C:\Automation\NetBank. Regression.
Read more >
Could not resolve CoreCLR path. For more details, enable ...
Hello I have Windows 10 prof and install. Microsoft Visual Studio Community 2019. Version 16.7.6. A simp c# program to rotate file names...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found