Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable warnings at solution level in .NET projects

I referred to many blogs that are suggesting to suppress warnings or errors at the project level but my concern is to suppress the same warning at solution level.

I found a workaround to suppress warnings or errors at solution level using .editorConfig file present under the Solution Items folder under our Visual Studio solution. But this .editorConfig file will suppress warnings/errors in Visual Studio solution but not in Build pipelines.

Could someone help me with this issue?

like image 521
SAREKA AVINASH Avatar asked Oct 22 '25 11:10

SAREKA AVINASH


1 Answers

You can create one GlobalSuppressions.cs file (I created for one project then cut and paste in solution level) in solution level.

You can add GlobalSuppressions.cs file in each project 'As a Link'. And It will work with VisualStudio and the build pipeline.

enter image description here

like image 137
Pankaj Rawat Avatar answered Oct 25 '25 01:10

Pankaj Rawat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!