In Solution Explorer, select your project, expand the Dependencies, Analyzers branch. select the ones you'd prefer not to see, right click and change the severity.
Disable Code Analysis on Test Projects
I followed the instructions from Microsoft to turn off Code Analysis on test projects. Yet I continue to get analysis messages for these projects.
https://learn.microsoft.com/en-us/visualstudio/code-quality/disable-code-analysis?view=vs-2019
For example:
Severity Code Description Project File Line Suppression State
Message IDE0017 Object initialization can be simplified MyProj.Tests C:\Projects\MyProj.Tests\UnitTest1.cs 43 Active
2 answers
Sort by: Most helpful
-
-
Dylan Zhu-MSFT 6,421 Reputation points
2021-02-24T05:48:20.073+00:00 Hi WILLIAMBEHNING,
You can try to select Microsoft Managed Minimum Rules or customize an empty ruleset.
Best Regards, Dylan
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our * *documentation* to enable e-mail notifications if you want to receive the related email notification for this thread.**