未找到指定的框架“Microsoft.AspNetCore.App",版本“2.1.0" [英] The specified framework 'Microsoft.AspNetCore.App', version '2.1.0' was not found

查看:85
本文介绍了未找到指定的框架“Microsoft.AspNetCore.App",版本“2.1.0"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试将我的 Web 应用程序从 .net core 2.0 升级到 .net core 2.1我做到了:

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

1) 安装 Visual Studio Professional 2017 预览版 15.8.0 预览版 1.1
2) 从这里安装 .net core 2.1.3 RC1 SDK:https://www.microsoft.com/net/download/dotnet-core/sdk-2.1.300-rc1
3) 将我所有的 aspnetcore nuget 包更新到最新版本.

1) Install Visual Studio Professional 2017 Preview Version 15.8.0 Preview 1.1
2) Installed the .net core 2.1.3 RC1 SDK from here: https://www.microsoft.com/net/download/dotnet-core/sdk-2.1.300-rc1
3) Updated all of my aspnetcore nuget packages to the latest version.

做完这两件事后,当我开始我的项目时,我会看到这个屏幕:

After doing both of these things, when I start my project I get this screen:

HTTP 错误 502.5 - 进程失败此问题的常见原因:

HTTP Error 502.5 - Process Failure Common causes of this issue:

The application process failed to start
The application process started but then stopped
The application process started but failed to listen on the configured port 

故障排除步骤:

Check the system event log for error messages
Enable logging the application process' stdout messages
Attach a debugger to the application process and inspect 

欲了解更多信息,请访问:https://go.microsoft.com/fwlink/?LinkID=808681>

For more information visit: https://go.microsoft.com/fwlink/?LinkID=808681

在我的 ASP.NET Core Web 服务器的输出窗口中,我得到了这个:

and in my Output window from ASP.NET Core Web Server, I get this:

The specified framework 'Microsoft.AspNetCore.App', version '2.1.0' was not found.
  - Check application dependencies and target a framework version installed at:
      C:Program Filesdotnet
  - Installing .NET Core prerequisites might help resolve this problem:
      http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
  - The .NET Core framework and SDK can be installed from:
      https://aka.ms/dotnet-download
  - The following versions are installed:
      2.1.0-preview2-final at [C:Program FilesdotnetsharedMicrosoft.AspNetCore.App]
      2.1.0-rc1-final at [C:Program FilesdotnetsharedMicrosoft.AspNetCore.App]
It was not possible to find any compatible framework version
The specified framework 'Microsoft.AspNetCore.App', version '2.1.0' was not found.
  - Check application dependencies and target a framework version installed at:
      C:Program Filesdotnet
  - Installing .NET Core prerequisites might help resolve this problem:
      http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
  - The .NET Core framework and SDK can be installed from:
      https://aka.ms/dotnet-download
  - The following versions are installed:
      2.1.0-preview2-final at [C:Program FilesdotnetsharedMicrosoft.AspNetCore.App]
      2.1.0-rc1-final at [C:Program FilesdotnetsharedMicrosoft.AspNetCore.App]

推荐答案

.NET Core 2.1 SDK 将于本周发布.如果您不能等到那时,请将其添加到您的 *.csproj

.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>

并从以下位置下载最终的 SDK:https://dotnetcli.blob.core.windows.net/dotnet/Sdk/2.1.300/dotnet-sdk-2.1.300-win-x64.exe

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

有关详细信息,请访问:https://github.com/aspnet/Home/wiki/2.1.0-Early-Access-Downloads

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

这篇关于未找到指定的框架“Microsoft.AspNetCore.App",版本“2.1.0"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆