C# 如何降级到.NETCore1.0?

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

我是.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 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代码放在那里

  • 选择ASP.NET核心Web应用程序并命名项目。单击“确定”
  • 在下一个屏幕上,将项目从下拉列表更改为目标.NET Core 1.0。从教程中选择任何其他选项。单击“确定”
  • 选择3 将.NET Core 2.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>