The specified framework 'Microsoft.NETCore.App', version '2.1.1' was not found after the SDK is uninstalled
See original GitHub issueSteps to reproduce
You need to already have the Microsoft.NETCore.App 2.1.0 SDK installed with a web project with the versionless Microsoft.AspNetCore.App in the .csproj. <PackageReference Include="Microsoft.AspNetCore.App" />
Install the Microsoft.NETCore.App 2.1.1 SDK and debug your project. I got it from here: https://github.com/dotnet/versions/tree/7a833dddfddc27f2074b755b94234a25b9757637/build-info/dotnet/product/cli/release
Uninstall the Microsoft.NETCore.App 2.1.1 SDK.
Debug the web project again.
Expected behavior
Should run with version 2.1.0.
Actual behavior
Getting the following error message when debugging: It was not possible to find any compatible framework version The specified framework ‘Microsoft.NETCore.App’, version ‘2.1.1’ was not found. The following versions are installed: 2.1.0 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
I tried with a repair on the 2.1.0 SDK, reboot, all changes are rolled back from the source control. I cannot see a reference to the 2.1.1 version anywhere. Where does it think that I should target 2.1.1 after I have uninstalled it?
Environment data
dotnet --info
output:
.NET Core SDK (reflecting any global.json):
Version: 2.1.300
Commit: adab45bf0c
Runtime Environment: OS Name: Windows OS Version: 6.1.7601 OS Platform: Windows RID: win7-x64 Base Path: C:\Program Files\dotnet\sdk\2.1.300\
Host (useful for support): Version: 2.1.0 Commit: caa7b7e2ba
.NET Core SDKs installed: 1.0.0-preview1-002702 [C:\Program Files\dotnet\sdk] 1.0.0-preview2-003121 [C:\Program Files\dotnet\sdk] 1.0.0-preview2-003131 [C:\Program Files\dotnet\sdk] 1.0.0 [C:\Program Files\dotnet\sdk] 1.0.2 [C:\Program Files\dotnet\sdk] 1.0.3 [C:\Program Files\dotnet\sdk] 1.0.4 [C:\Program Files\dotnet\sdk] 1.1.0 [C:\Program Files\dotnet\sdk] 2.0.0 [C:\Program Files\dotnet\sdk] 2.0.2 [C:\Program Files\dotnet\sdk] 2.0.3 [C:\Program Files\dotnet\sdk] 2.1.2 [C:\Program Files\dotnet\sdk] 2.1.4 [C:\Program Files\dotnet\sdk] 2.1.100 [C:\Program Files\dotnet\sdk] 2.1.101 [C:\Program Files\dotnet\sdk] 2.1.102 [C:\Program Files\dotnet\sdk] 2.1.103 [C:\Program Files\dotnet\sdk] 2.1.104 [C:\Program Files\dotnet\sdk] 2.1.200 [C:\Program Files\dotnet\sdk] 2.1.201 [C:\Program Files\dotnet\sdk] 2.1.300 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 1.0.0-rc2-3002702 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 1.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 1.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 1.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 1.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 1.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 1.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:29 (13 by maintainers)
Top GitHub Comments
@tstojecki how did you update the package? did the NuGet package manager offer you to update the package reference?
The idea is that you don’t specify the version of the package in the project file and let the tooling choose a version for you:
looks like you have an outdated version of the base image on your machine. can you do a
docker pull microsoft/dotnet:2.1-aspnetcore-runtime
and see if it pulls a newer version? then try rebuilding your image.