question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The specified framework 'Microsoft.NETCore.App', version '2.1.1' was not found after the SDK is uninstalled

See original GitHub issue

Steps 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:29 (13 by maintainers)

github_iconTop GitHub Comments

10reactions
dasMullicommented, Jun 21, 2018

@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:

<Project Sdk="Microsoft.NET.Sdk.Web">
…
<ItemGroup>
   <!--  No Version needed -->
  <PackageReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
</Project>
9reactions
dasMullicommented, Jun 23, 2018

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The specified framework 'Microsoft.NETCore.App', version ...
The specified framework 'Microsoft.NETCore.App', version '2.1.1' was not found after the SDK is uninstalled #9522.
Read more >
The specified framework 'Microsoft.AspNetCore.App' ...
The specified framework 'Microsoft.AspNetCore.App', version '2.1.0' was not found · 4. Apparently they released the nuget packages that rely on ...
Read more >
Remove the .NET runtime and SDK
This article describes how to uninstall .NET. You'll need to determine which versions of the .NET Runtime and SDK are currently installed, ...
Read more >
Started to get "This project is targeting a version of .NET ...
I'm getting this same issue with ASP.Net Core 3.1. The solution has been fine for two years and now it want's to install...
Read more >
NET uninstall tool
An overview of the .NET Uninstall Tool, a guided tool that enables the controlled clean-up of .NET SDKs and runtimes.
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