Skip to content

Commit 49da7ff

Browse files
committed
Fix source-build
1 parent 8049330 commit 49da7ff

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

eng/Versions.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@
6565
<SystemCommandLineVersion>2.0.0-rc.1.25377.103</SystemCommandLineVersion>
6666
<SystemCommandLineNamingConventionBinderVersion>2.0.0-beta5.25279.2</SystemCommandLineNamingConventionBinderVersion>
6767
<MicrosoftCodeAnalysisAnalyzerTestingVersion>1.1.2</MicrosoftCodeAnalysisAnalyzerTestingVersion>
68-
<MicrosoftCodeAnalysisVersionForNetAnalyzers>3.11.0</MicrosoftCodeAnalysisVersionForNetAnalyzers>
68+
<MicrosoftCodeAnalysisVersionForNetAnalyzers Condition="'$(DotNetBuildSourceOnly)' != 'true'">3.11.0</MicrosoftCodeAnalysisVersionForNetAnalyzers>
69+
<MicrosoftCodeAnalysisVersionForNetAnalyzers Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(MicrosoftCodeAnalysisVersion)</MicrosoftCodeAnalysisVersionForNetAnalyzers>
6970
<MicrosoftVisualBasicVersion>10.3.0</MicrosoftVisualBasicVersion>
7071
<MicrosoftVisualStudioSetupConfigurationInteropVersion>3.2.2146</MicrosoftVisualStudioSetupConfigurationInteropVersion>
7172
<MicrosoftWindowsCsWin32PackageVersion>0.3.49-beta</MicrosoftWindowsCsWin32PackageVersion>

src/Microsoft.CodeAnalysis.NetAnalyzers/src/Directory.Build.props

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,19 @@
55
<PropertyGroup>
66
<CentralPackageTransitivePinningEnabled>false</CentralPackageTransitivePinningEnabled>
77

8-
<!-- RS1024: Compare symbols correctly https://github.com/dotnet/roslyn-analyzers/issues/6381 -->
8+
<!-- RS1024: Compare symbols correctly https://github.com/dotnet/roslyn-analyzers/issues/6381 -->
99
<NoWarn>$(NoWarn);RS1024</NoWarn>
10+
11+
<!-- RS1036: A project containing analyzers or source generators should specify the property '<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>'.
12+
https://github.com/dotnet/roslyn-analyzers/issues/6443 tracks enabling RS1036 and fixing RS1035 violations -->
13+
<NoWarn>$(NoWarn);RS1036</NoWarn>
14+
15+
<!--
16+
Analyzers currently reference Microsoft.CodeAnalysis.Workspaces which triggers this warning.
17+
RS1038: Compiler extensions should be implemented in assemblies with compiler-provided references
18+
-->
19+
<NoWarn>$(NoWarn);RS1038</NoWarn>
20+
1021
<!-- CS1573: Parameter 'parameter' has no matching param tag in the XML comment for 'member' (but other parameters do) -->
1122
<NoWarn Condition="'$(Language)' == 'C#'">$(NoWarn);1573</NoWarn>
1223

@@ -25,4 +36,13 @@
2536
<NetAnalyzersRootDir>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)..'))</NetAnalyzersRootDir>
2637
</PropertyGroup>
2738

39+
<PropertyGroup Condition="'$(DotNetBuildSourceOnly)' == 'true'">
40+
<!-- When building in source build mode, treat this set of warnings not as errors.-->
41+
<!-- Some crefs reference internal APIs not present in the reference package. -->
42+
<NoWarn>$(NoWarn);CS0618;CS1574;CS8600;CS8602;CS8604;CS8625</NoWarn>
43+
<!-- Source build reference assemblies are not correctly annotated.
44+
https://github.com/dotnet/source-build/issues/3531 -->
45+
<NoWarn>$(NoWarn);CS8603</NoWarn>
46+
</PropertyGroup>
47+
2848
</Project>

0 commit comments

Comments
 (0)