【发布时间】:2022-10-19 22:37:54
【问题描述】:
系统:MacOS Monterey、JetBrains Rider 2022.2.1、.NET 6.0.6
我无法从 Rider 构建我的解决方案,因为我的一位同事在迁移中添加了下划线,并且我们有一个 Stylecop 规则集用于一些代码分析,我不知道如何为自动生成的迁移文件禁用它。如果我使用dotnet run 或dotnet build 从终端构建或运行我的解决方案,它工作正常。
20220823130032_Dep_ExcludeTotalCapacityInParent.cs(7, 26): [CA1707] Remove the underscores from type name Plancise.Data.EF.Migrations.Dep_ExcludeTotalCapacityInParent
我的迁移文件夹中还有一个.editorconfig 文件,其中包含以下内容,但这对我没有帮助。
[*.cs]
generated_code = true
我还尝试在 Rider 中设置检查设置,并将文件夹“迁移”添加到“要跳过的元素”部分或生成的代码部分。
似乎没有任何效果,这真的很痛苦。
【问题讨论】:
标签: .net entity-framework-migrations jetbrains-ide build-error jetbrains-rider