Skip to content

Commit d4b069a

Browse files
committed
如果目标编译器不满足分析器和源生成器要求,则报告编译错误
1 parent 2bfe8bf commit d4b069a

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
-->
2121
<NoWarn>$(NoWarn);DCL101;NU1507</NoWarn>
2222
<!--
23-
CA1416: 平台兼容性警告
23+
CA1416: Platform compatibility warning
2424
-->
25-
<WarningsAsErrors>$(WarningAsErrors);CA1416</WarningsAsErrors>
25+
<WarningsAsErrors>$(WarningsAsErrors);CA1416</WarningsAsErrors>
2626
</PropertyGroup>
2727

2828
<!-- 库和项目信息 -->

src/DotNetCampus.CommandLine/Package/build/Package.props

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
<Project>
22

33
<PropertyGroup>
4+
5+
<!--
6+
The analyzers in this package is very important, so we treat related warnings as errors.
7+
- CS8785: Analyzer does not generate sources
8+
- CS9057: Analyzer version is greater than the compiler version
9+
-->
10+
<WarningsAsErrors>$(WarningsAsErrors);CS8785;CS9057</WarningsAsErrors>
11+
412
<DotNetCampusCommandLineUseInterceptor Condition="'$(DotNetCampusCommandLineUseInterceptor)' == ''">true</DotNetCampusCommandLineUseInterceptor>
513
<InterceptorsNamespaces>$(InterceptorsNamespaces);DotNetCampus.Cli.Compiler</InterceptorsNamespaces>
614

0 commit comments

Comments
 (0)