Reputation: 479
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?
Upvotes: 4
Views: 2749
Reputation: 4573
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.
Upvotes: 5
Reputation: 84
You can use argument to the compiler. https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/warn-compiler-option
Upvotes: -1