且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在VS 2017.3中引用.NET 4.6 NuGet程序包时如何隐藏.NET Core兼容性警告

更新时间:2023-02-09 09:17:13

我在Google图片搜索中找到了我的问题的答案,这导致我看到了一条看似无关的SO帖子:

I found an answer to my question in a Google Images search, which led me to this seemingly unrelated SO post:


抑制Roslyn代码分析器中的问题

简而言之,NuGet包引用的属性页面具有 NoWarn 属性,可以在其中指定错误代码,如下图所示:

In short, the Properties page of the NuGet package reference has a NoWarn attribute where the error code can be specified, as shown in the following image: