gpt4 book ai didi

msbuild - 如何在msbuild/Visual Studio中抑制nuget warnings警告

转载 作者:行者123 更新时间:2023-12-02 10:59:32 27 4
gpt4 key购买 nike

我收到来自 VS2017 的以下警告

15>C:\Users\phelan\workspace\weincad.net\WeinCad.Plugin\WeinCad.Plugin.csproj : warning NU1602: FSharpx.Async 1.13.2 does not provide an inclusive lower bound for dependency FSharp.Control.AsyncSeq. An approximate best match of FSharp.Control.AsyncSeq 1.13.0 was resolved.

这是警告NU1602

我已添加

  <PropertyGroup >
<NoWarn>NU1602</NoWarn>
</PropertyGroup>

到我的Directory.Build.props文件。

Nuget 文档 claims NoWarn 指令将遵守 nuget 警告。

The errors and warnings listed here are available only with PackageReference-based projects and NuGet 4.3.0. NuGet also honors MSBuild properties to suppress warnings or elevate them to errors. For more information, see How to: Suppress Compiler Warnings in the Visual Studio documentation.

但压制并未得到尊重。这是一个错误还是我做错了什么。

最佳答案

很可能您遇到了问题 #5740 NoWarn on a package reference does not apply transitively to its dependencies 跟踪的错误。在 NuGet 存储库中。

发出警告的原因不是直接项目依赖项 FSharpx.Async 1.13.2,而是由于该包依赖项 FSharp.Control.AsyncSeq

关于msbuild - 如何在msbuild/Visual Studio中抑制nuget warnings警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47013070/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com