如何强制Visual Studio 2017降级到以前的.NET Core版本 [英] How do I force Visual Studio 2017 to downgrade to a previous .NET Core version
问题描述
如何在Visual Studio 2017中降级Microsoft.NETCore.App程序包?
How do I downgrade the Microsoft.NETCore.App package in Visual Studio 2017?
包管理器将其显示为被项目阻止
The package manager shows it as 'Blocked by project'
我需要这样做,因为Azure Web应用尚未安装1.1.2 .NET Core运行时。
I need to do this as Azure web apps do not yet have the 1.1.2 .NET Core runtime installed.
推荐答案
可以通过编辑csproj文件并添加指定 Update 而不是的软件包引用来使用特定版本的软件包。包括
A specific version of the package can be used by editing the csproj file and adding a package reference that specifies Update instead of Include
< ItemGroup>
< PackageReference Update = Microsoft.NETCore.App Version = 1.1.1 />
< PackageReference Include = Microsoft.ApplicationInsights.AspNetCore Version = 2.0.0 />
< PackageReference Include = Microsoft.AspNetCore Version = 1.1.1 />
这篇关于如何强制Visual Studio 2017降级到以前的.NET Core版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!