Search code examples
c#visual-studioasp.net-coremodel-view-controller.net-core

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?


Solution

  • 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