The specified framework 'Microsoft.AspNetCore.App', version '2.1.0' was not found

前端 未结 6 730
一整个雨季
一整个雨季 2021-01-07 16:27

I tried to upgrade my web app from .net core 2.0 to .net core 2.1 I did:

1) Install Visual Studio Professional 2017 Preview Version 15.8.0 Preview 1.1
2) Install

相关标签:
6条回答
  • 2021-01-07 17:04

    I opened the Visual Studio installer, went to Individual Components, selected .NET Core 2.1 Runtime (LTS), and installed it.

    Solved my problem.

    0 讨论(0)
  • 2021-01-07 17:09

    .NET Core 2.1 SDK will be released this week. If you can't wait until then, add this to your *.csproj

    <Project Sdk="Microsoft.NET.Sdk.Web">
      <PropertyGroup>
        <TargetFramework>netcoreapp2.1</TargetFramework>
        <RestoreAdditionalProjectSources>
            https://dotnetfeed.blob.core.windows.net/orchestrated-release-2-1/20180515-07/final/index.json
        </RestoreAdditionalProjectSources>
      </PropertyGroup>
      
      ....
    </Project>
    

    And download the final SDK from: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/2.1.300/dotnet-sdk-2.1.300-win-x64.exe

    For more details visit: https://github.com/aspnet/Home/wiki/2.1.0-Early-Access-Downloads

    0 讨论(0)
  • 2021-01-07 17:12

    By updating all NuGet packages, you seem to have upgraded from the RC version you started out with (which is installed on your system) to the RTM version currently being released (and thus already available on NuGet but not installed on your system).

    The Microsoft.AspNetCore.App NuGet packages are supposed to be referenced without a version so that the installed tooling can pick an appropriate version.

    Update your .csproj file to remove the Version attribute and only reference that package through:

    <ItemGroup>
      <PackageReference Include="Microsoft.AspNetCore.App" />
    </ItemGroup>
    
    0 讨论(0)
  • 2021-01-07 17:12

    Looks like it's available on chocolatey now https://chocolatey.org/packages/dotnetcore-sdk/2.1.300

    Not yet on the normal dotnet distribution sites. Crazy.

    0 讨论(0)
  • 2021-01-07 17:13

    .NET Core SDK 2.1.300 is now available: https://www.microsoft.com/net/download/windows Install it, this fixed the problem for me.

    0 讨论(0)
  • 2021-01-07 17:15
    1. uninstall previous version
    2. Download and install version 2.1 sdk
    3. After the whole process reboot your PC

    It should work.

    0 讨论(0)
提交回复
热议问题