@@ -51,6 +51,7 @@ private class ProjectData
5151 public ImmutableArray < string > AdditionalFiles { get ; }
5252 public ImmutableArray < string > AnalyzerConfigFiles { get ; }
5353 public ImmutableArray < string > WarningsAsErrors { get ; }
54+ public ImmutableArray < string > WarningsNotAsErrors { get ; }
5455 public RuleSet RuleSet { get ; }
5556 public ImmutableDictionary < string , string > ReferenceAliases { get ; }
5657 public ImmutableDictionary < string , string > ProjectReferenceAliases { get ; }
@@ -76,6 +77,7 @@ private ProjectData()
7677 ReferenceAliases = ImmutableDictionary < string , string > . Empty ;
7778 ProjectReferenceAliases = ImmutableDictionary < string , string > . Empty ;
7879 WarningsAsErrors = ImmutableArray < string > . Empty ;
80+ WarningsNotAsErrors = ImmutableArray < string > . Empty ;
7981 }
8082
8183 private ProjectData (
@@ -94,6 +96,7 @@ private ProjectData(
9496 ImmutableArray < string > preprocessorSymbolNames ,
9597 ImmutableArray < string > suppressedDiagnosticIds ,
9698 ImmutableArray < string > warningsAsErrors ,
99+ ImmutableArray < string > warningsNotAsErrors ,
97100 bool signAssembly ,
98101 string assemblyOriginatorKeyFile ,
99102 bool treatWarningsAsErrors ,
@@ -126,6 +129,7 @@ private ProjectData(
126129 PreprocessorSymbolNames = preprocessorSymbolNames . EmptyIfDefault ( ) ;
127130 SuppressedDiagnosticIds = suppressedDiagnosticIds . EmptyIfDefault ( ) ;
128131 WarningsAsErrors = warningsAsErrors . EmptyIfDefault ( ) ;
132+ WarningsNotAsErrors = warningsNotAsErrors . EmptyIfDefault ( ) ;
129133
130134 SignAssembly = signAssembly ;
131135 AssemblyOriginatorKeyFile = assemblyOriginatorKeyFile ;
@@ -153,6 +157,7 @@ private ProjectData(
153157 ImmutableArray < string > preprocessorSymbolNames ,
154158 ImmutableArray < string > suppressedDiagnosticIds ,
155159 ImmutableArray < string > warningsAsErrors ,
160+ ImmutableArray < string > warningsNotAsErrors ,
156161 bool signAssembly ,
157162 string assemblyOriginatorKeyFile ,
158163 ImmutableArray < string > sourceFiles ,
@@ -171,7 +176,7 @@ private ProjectData(
171176 ImmutableDictionary < string , string > projectReferenceAliases )
172177 : this ( guid , name , assemblyName , targetPath , outputPath , intermediateOutputPath , projectAssetsFile ,
173178 configuration , platform , targetFramework , targetFrameworks , outputKind , languageVersion , nullableContextOptions , allowUnsafeCode , checkForOverflowUnderflow ,
174- documentationFile , preprocessorSymbolNames , suppressedDiagnosticIds , warningsAsErrors , signAssembly , assemblyOriginatorKeyFile , treatWarningsAsErrors , defaultNamespace , runAnalyzers , runAnalyzersDuringLiveAnalysis , ruleset )
179+ documentationFile , preprocessorSymbolNames , suppressedDiagnosticIds , warningsAsErrors , warningsNotAsErrors , signAssembly , assemblyOriginatorKeyFile , treatWarningsAsErrors , defaultNamespace , runAnalyzers , runAnalyzersDuringLiveAnalysis , ruleset )
175180 {
176181 SourceFiles = sourceFiles . EmptyIfDefault ( ) ;
177182 ProjectReferences = projectReferences . EmptyIfDefault ( ) ;
@@ -216,6 +221,7 @@ public static ProjectData Create(MSB.Evaluation.Project project)
216221 var preprocessorSymbolNames = PropertyConverter . ToPreprocessorSymbolNames ( project . GetPropertyValue ( PropertyNames . DefineConstants ) ) ;
217222 var suppressedDiagnosticIds = PropertyConverter . ToSuppressedDiagnosticIds ( project . GetPropertyValue ( PropertyNames . NoWarn ) ) ;
218223 var warningsAsErrors = PropertyConverter . SplitList ( project . GetPropertyValue ( PropertyNames . WarningsAsErrors ) , ',' ) ;
224+ var warningsNotAsErrors = PropertyConverter . SplitList ( project . GetPropertyValue ( PropertyNames . WarningsNotAsErrors ) , ',' ) ;
219225 var signAssembly = PropertyConverter . ToBoolean ( project . GetPropertyValue ( PropertyNames . SignAssembly ) , defaultValue : false ) ;
220226 var assemblyOriginatorKeyFile = project . GetPropertyValue ( PropertyNames . AssemblyOriginatorKeyFile ) ;
221227 var treatWarningsAsErrors = PropertyConverter . ToBoolean ( project . GetPropertyValue ( PropertyNames . TreatWarningsAsErrors ) , defaultValue : false ) ;
@@ -225,7 +231,7 @@ public static ProjectData Create(MSB.Evaluation.Project project)
225231 return new ProjectData (
226232 guid , name , assemblyName , targetPath , outputPath , intermediateOutputPath , projectAssetsFile ,
227233 configuration , platform , targetFramework , targetFrameworks , outputKind , languageVersion , nullableContextOptions , allowUnsafeCode , checkForOverflowUnderflow ,
228- documentationFile , preprocessorSymbolNames , suppressedDiagnosticIds , warningsAsErrors , signAssembly , assemblyOriginatorKeyFile , treatWarningsAsErrors , defaultNamespace , runAnalyzers , runAnalyzersDuringLiveAnalysis , ruleset : null ) ;
234+ documentationFile , preprocessorSymbolNames , suppressedDiagnosticIds , warningsAsErrors , warningsNotAsErrors , signAssembly , assemblyOriginatorKeyFile , treatWarningsAsErrors , defaultNamespace , runAnalyzers , runAnalyzersDuringLiveAnalysis , ruleset : null ) ;
229235 }
230236
231237 public static ProjectData Create ( MSB . Execution . ProjectInstance projectInstance )
@@ -260,6 +266,7 @@ public static ProjectData Create(MSB.Execution.ProjectInstance projectInstance)
260266 var preprocessorSymbolNames = PropertyConverter . ToPreprocessorSymbolNames ( projectInstance . GetPropertyValue ( PropertyNames . DefineConstants ) ) ;
261267 var suppressedDiagnosticIds = PropertyConverter . ToSuppressedDiagnosticIds ( projectInstance . GetPropertyValue ( PropertyNames . NoWarn ) ) ;
262268 var warningsAsErrors = PropertyConverter . SplitList ( projectInstance . GetPropertyValue ( PropertyNames . WarningsAsErrors ) , ',' ) ;
269+ var warningsNotAsErrors = PropertyConverter . SplitList ( projectInstance . GetPropertyValue ( PropertyNames . WarningsNotAsErrors ) , ',' ) ;
263270 var signAssembly = PropertyConverter . ToBoolean ( projectInstance . GetPropertyValue ( PropertyNames . SignAssembly ) , defaultValue : false ) ;
264271 var treatWarningsAsErrors = PropertyConverter . ToBoolean ( projectInstance . GetPropertyValue ( PropertyNames . TreatWarningsAsErrors ) , defaultValue : false ) ;
265272 var runAnalyzers = PropertyConverter . ToBoolean ( projectInstance . GetPropertyValue ( PropertyNames . RunAnalyzers ) , defaultValue : true ) ;
@@ -333,7 +340,7 @@ public static ProjectData Create(MSB.Execution.ProjectInstance projectInstance)
333340 return new ProjectData ( guid , name ,
334341 assemblyName , targetPath , outputPath , intermediateOutputPath , projectAssetsFile ,
335342 configuration , platform , targetFramework , targetFrameworks ,
336- outputKind , languageVersion , nullableContextOptions , allowUnsafeCode , checkForOverflowUnderflow , documentationFile , preprocessorSymbolNames , suppressedDiagnosticIds , warningsAsErrors ,
343+ outputKind , languageVersion , nullableContextOptions , allowUnsafeCode , checkForOverflowUnderflow , documentationFile , preprocessorSymbolNames , suppressedDiagnosticIds , warningsAsErrors , warningsNotAsErrors ,
337344 signAssembly , assemblyOriginatorKeyFile ,
338345 sourceFiles , projectReferences . ToImmutable ( ) , references . ToImmutable ( ) , packageReferences , analyzers , additionalFiles , editorConfigFiles , treatWarningsAsErrors , defaultNamespace , runAnalyzers , runAnalyzersDuringLiveAnalysis , ruleset ,
339346 referenceAliases . ToImmutableDictionary ( ) , projectReferenceAliases . ToImmutable ( ) ) ;
0 commit comments