如何强制 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
<代码><项目组><PackageReference Update="Microsoft.NETCore.App" 版本="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屋!