我的編輯器配置
# top-most EditorConfig file, hierarchy search will stop in this file
root = true
# ----------------------------------------------------------------------------------------------------------------------
# Coding styles
# ----------------------------------------------------------------------------------------------------------------------
# Dotnet code style settings:
[*.{cs,vb}]
dotnet_diagnostic.IDE0055.severity = error
dotnet_style_namespace_match_folder = true:error
I類測驗反對。命名空間應與結構匹配并等于ConsoleApp1
namespace ConsoleApp1.NotHere
{
public class Class
{
private int X { get; set; } = 0;
public int Y { get; set; }
}
}
解決方案構建沒有錯誤,命名空間在 VS 中未突出顯示。我已經檢查了 VS 2022 和 2019 中 .net 6 中的新控制臺專案以及最新更新
VS 2022 社區版 17.1.1
VS 2019 專業版 16.11
檔案說它應該在兩個 IDE 中都可用,但我不能讓它作業。有任何想法嗎?
uj5u.com熱心網友回復:
嘗試使用IDE0130診斷 ID:
dotnet_diagnostic.IDE0130.severity = error
請注意,語法option = rule:severity遲早會被棄用。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/442593.html
上一篇:如何在VisualStudio中“分離”啟動QtDesigner?
下一篇:獲取迭代的最后一行-UNIX
