gpt4 book ai didi

c# - 如何抑制来自特定 dll 的警告

转载 作者:行者123 更新时间:2023-11-30 22:31:05 25 4
gpt4 key购买 nike

我正在我的项目中添加不符合 CLS 的第 3 方 Lotus Notes dll。我需要设置“将警告视为错误”。我怎样才能仅抑制来自该特定 dll 的所有警告。

所有警告都像

Identifier 'Domino.Name_Of_Identifier' is not CLS-compliant

最佳答案

您无法抑制来自特定 DLL 的警告 - 但您可以关闭特定警告。

在消息中,您会看到一个类似 CS3008 的数字 - 进入“项目属性”、“构建”选项卡,然后将其输入到“抑制警告”字段中。

Project Properties, Build Page

关于c# - 如何抑制来自特定 dll 的警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9402268/

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