如何从.Net Core 2.1 RC1升级到.NET Core 2.1的稳定版本?

编程入门 行业动态 更新时间:2024-10-22 20:34:06
本文介绍了如何从.Net Core 2.1 RC1升级到.NET Core 2.1的稳定版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

需要SignalR,在5月30日之前启动我的项目,当发布稳定版本的ASP .NET Core 2.1时,我选择使用ASP .NET Core 2.1 RC1.

但是,一旦发布了稳定版本,我自然希望抛弃预览版本并升级到稳定版本.该怎么做?

为了实现这一目标,我去了

Needing SignalR, having started my project before 30th May, when the stable version of ASP .NET Core 2.1 was released, I opted to use ASP .NET Core 2.1 RC1.

However, once the stable version is released, I'd naturally like to leave the preview version behind and upgrade to the stable version. How to do this?

In order to achieve that, I went to www.microsoft/net/download/visual-studio-sdks and downloaded .NET Core 2.1 x64 installer from there. However, having installed it, I cannot now compile my project. The compilation fails with the following errors:

NuGet package restore failed. Please see Error List window for detailed warnings and errors. 1>------ Build started: Project: mon, Configuration: Debug Any CPU ------ 1>C:\Users\m\source\repos\mon\mon\mon.csproj : warning NU1608: Detected package version outside of dependency constraint: Microsoft.CodeAnalysis.CSharp.Workspaces 2.8.0-beta3 requires Microsoft.CodeAnalysis.CSharp (= 2.8.0-beta3) but version Microsoft.CodeAnalysis.CSharp 2.8.0 was resolved. 1>C:\Users\m\source\repos\mon\mon\mon.csproj : error NU1107: Version conflict detected for Microsoft.CodeAnalysis.Common. Reference the package directly from the project to resolve this issue. 1>C:\Users\m\source\repos\mon\mon\mon.csproj : error NU1107: mon -> Microsoft.AspNetCore.App 2.1.0 -> Microsoft.AspNetCore.Mvc.Razor 2.1.0 -> Microsoft.CodeAnalysis.CSharp 2.8.0 -> Microsoft.CodeAnalysis.Common (= 2.8.0) 1>C:\Users\m\source\repos\mon\mon\mon.csproj : error NU1107: mon -> Microsoft.VisualStudio.Web.CodeGeneration.Design 2.1.0-rc1-final -> Microsoft.VisualStudio.Web.CodeGenerators.Mvc 2.1.0-rc1-final -> Microsoft.VisualStudio.Web.CodeGeneration 2.1.0-rc1-final -> Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore 2.1.0-rc1-final -> Microsoft.VisualStudio.Web.CodeGeneration.Core 2.1.0-rc1-final -> Microsoft.VisualStudio.Web.CodeGeneration.Templating 2.1.0-rc1-final -> Microsoft.VisualStudio.Web.CodeGeneration.Utils 2.1.0-rc1-final -> Microsoft.CodeAnalysis.CSharp.Workspaces 2.8.0-beta3 -> Microsoft.CodeAnalysis.Workspaces.Common 2.8.0-beta3 -> Microsoft.CodeAnalysis.Common (= 2.8.0-beta3). 1>Done building project "mon.csproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

How do I fix this?

Honestly, my current idea is to uninstall Visual Studio & all .NET Core SDK entries from Programs & Functions in Control Panel, then install it anew, create a new ASP .NET Core project, paste all source files I manually wrote from the old project to the new one... I suppose here must be a better way?

解决方案

I was getting the same error message. I then tried, without success, to update the Microsoft.AspNetCore.App and Microsoft.NetCore.App NuGet packages and it told me I needed to remove the Microsoft.VisualStudio.Web.CodeGeneration.Design reference. This resolved the issue in my case.

更多推荐

如何从.Net Core 2.1 RC1升级到.NET Core 2.1的稳定版本?

本文发布于:2023-11-07 11:13:07,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1566294.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:升级到   稳定   版本   Core   Net

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!