gpt4 book ai didi

asp.net-core - 找不到指定的框架 'Microsoft.AspNetCore.App' ,版本 '2.1.0'

转载 作者:行者123 更新时间:2023-12-02 03:39:12 25 4
gpt4 key购买 nike

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

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 包更新到最新版本。

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

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

Troubleshooting steps:

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

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

在 ASP.NET Core Web 服务器的输出窗口中,我得到以下信息:

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 Files\dotnet\
- 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 Files\dotnet\shared\Microsoft.AspNetCore.App]
2.1.0-rc1-final at [C:\Program Files\dotnet\shared\Microsoft.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 Files\dotnet\
- 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 Files\dotnet\shared\Microsoft.AspNetCore.App]
2.1.0-rc1-final at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]

最佳答案

.NET Core 2.1 SDK将于本周发布。如果您等不及,请将其添加到您的 *.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

更多详情请访问:https://github.com/aspnet/Home/wiki/2.1.0-Early-Access-Downloads

关于asp.net-core - 找不到指定的框架 'Microsoft.AspNetCore.App' ,版本 '2.1.0',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50594020/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com