MSBuild 中的代码检查
在 MSBuild 中,ReSharper 2026.3 提供了 12 项 专有代码检查 ,您可以 禁用其中的任何一项或更改其 严重性级别。
These code inspections help you detect code issues at design time in all open files, and additionally they allow you to find code issues in specific scope.
可配置的 MSBuild 检查列在下方,并按其 类别分组。
潜在的代码质量问题(11 项检查)
此类别包括检测关键问题(代码异味)的检查,主要具有 错误 或 警告 级别。 此类别还包括 确保本地化支持的检查。
检查 ID EditorConfig 属性 | 默认严重性 |
|---|
缺少必需的属性
MissingAttribute
resharper_missing_attribute_highlighting | 警告 |
定义了多个输出标签
MultipleOutputTags
resharper_multiple_output_tags_highlighting | 警告 |
需要输出标签
OutputTagRequired
resharper_output_tag_required_highlighting | 警告 |
未知的项目组
UnknownItemGroup
resharper_unknown_item_group_highlighting | 建议 |
未知的元数据
UnknownMetadata
resharper_unknown_metadata_highlighting | 建议 |
未知的输出参数
UnknownOutputParameter
resharper_unknown_output_parameter_highlighting | 警告 |
未知的属性
UnknownProperty
resharper_unknown_property_highlighting | 已禁用 |
未知的目标
UnknownTarget
resharper_unknown_target_highlighting | 建议 |
未知的任务
UnknownTask
resharper_unknown_task_highlighting | 警告 |
未知的任务属性
UnknownTaskAttribute
resharper_unknown_task_attribute_highlighting | 建议 |
错误的元数据使用
WrongMetadataUse
resharper_wrong_metadata_use_highlighting | 已禁用 |
安全性(1 项检查)
此类别中的检查会根据 Mend.io 报告存在漏洞的 NuGet 包。
2026年 11月 6日