C# 如何降级到.NETCore1.0?
我是.NETCore的初学者。我正在学习琳达的“学习ASP.NET核心MVC基础”课程。当我尝试学习视频5第1章的示例代码时,出现以下错误:C# 如何降级到.NETCore1.0?,c#,asp.net,asp.net-core,.net-core,asp.net-core-mvc,C#,Asp.net,Asp.net Core,.net Core,Asp.net Core Mvc,我是.NETCore的初学者。我正在学习琳达的“学习ASP.NET核心MVC基础”课程。当我尝试学习视频5第1章的示例代码时,出现以下错误: 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 s
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
在讨论了几个有关堆栈溢出的问题之后,我发现这是由于在练习文件中包含了较旧的.NET核心版本(1.0)造成的。但是我电脑中的Visual Studio版本是2.1.4。练习中的文件夹“wwwroot”也可能导致此问题
看来我能解决这个问题的唯一方法就是降级到1.0版。但是我该怎么做呢?是否必须卸载Visual Studio代码并使用.NET Core V 1.0安装它?Visual Studio不支持“降级”功能
选择1
查找使用.NET Core 2.0的教程。微软有非常好的教程和文档,这取决于你想介绍什么
.NETCore1.0基本上是微软称之为1.0的测试版。由于与.NET Core 2.0相比,它的功能(和实用性)有限,因此现在学习.NET Core 1.0一无所获
.NETCore2.1也即将发布
选择2
在Visual Studio 2017中创建一个以.NET Core 1.0为目标的新项目,并将所有.NET Core 1.0代码放在那里
Edit.csproj
TargetFramework
元素从netcoreapp2.0
更改为netcoreapp1.0
netcoreapp1.0
...
好啊我理解。谢谢你解决了这个问题。我想我应该跳过这门核心1.0课程,找一门V2.0及以上的课程。
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp1.0</TargetFramework>
</PropertyGroup>
...
</Project>