VS2017 Update breaks my dotnet CLI tool: The specified framework 'Microsoft.NETCore.App', version '1.0.5' was not found.
See original GitHub issueFrom @AArnott on June 26, 2017 5:18
I haven’t changed my dotnet CLI tool project in a significant way, but it stopped working on old machines when built with newer builds of VS 2017.
A build made a while back on this commit works. But recently I build this commit and suddenly an Ubuntu 14 machine can’t run my dotnet CLI tool, giving this error:
The specified framework 'Microsoft.NETCore.App', version '1.0.5' was not found.
- Check application dependencies and target a framework version installed at:
/usr/share/dotnet/shared/Microsoft.NETCore.App
- The following versions are installed:
1.1.1
1.0.4
- Alternatively, install the framework version '1.0.5'.
I found that between the two releases, the dotnet-codegen.runtimeconfig.json
file had changed in a subtle, yet evidently significant way. The new one requires 1.0.5:
{
"runtimeOptions": {
"framework": {
"name": "Microsoft.NETCore.App",
"version": "1.0.5"
}
}
}
Whereas the old release required 1.0.4.
My dotnet CLI tool project file has not changed between these two commits. And it specified a target framework of netcoreapp1.0
.
The only thing I can guess is that AppVeyor is now using agents with newer versions of VS2017, and somewhere along the line the dotnet SDK decided to automatically target a newer version of CoreCLR such that what I build no longer works on Ubuntu machines with dotnet CLI 1.0.1 installed (e.g. Travis CI). This is causing build breaks in projects that I’m trying to update to the latest build of my dotnet CLI tool.
How can I force my project to target 1.0.4 again? Why the automatic, implicit upgrade in requirements for my tool? How would I install 1.0.5 if I wanted to do that?
Copied from original issue: dotnet/coreclr#12447
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (8 by maintainers)
Top GitHub Comments
@AArnott , @livarcocc - If you have already followed the steps at https://www.microsoft.com/net/core#linuxubuntu, installed the SDK and just need the 1.0.5 shared framework then:
sudo apt-get install dotnet-sharedframework-microsoft.netcore.app-1.0.5
Package names get much nicer with 2.0.
I hate to be bashing Bing but a google search quickly tells me this is documented (vaguely) at in the main csproj reference: https://docs.microsoft.com/en-us/dotnet/core/tools/csproj#recommendations
(which I now see contains a bug calling
PackageReference
a property)The design for the version binding in 2+ is discussed and documented at https://github.com/dotnet/designs/issues/3