How to turn off Code Analyze and Code Cleanup

Water Yue 0 Reputation points
2024-01-04T08:01:49.0933333+00:00

How to turn off Code Analyze and Code Cleanup for a project or a solution?

even followed the instructions to add below:

<RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild> <RunAnalyzersDuringLiveAnalysis>false</RunAnalyzersDuringLiveAnalysis> <RunAnalyzers>false</RunAnalyzers>

but the project still cannot build!!!!!!!!!!!!

this issue occurred after upgrade to vs 2022 17.8.3.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,416 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 30,821 Reputation points Microsoft Vendor
    2024-01-05T03:53:02.9066667+00:00

    Hi @Water Yue

    Welcome to Microsoft Q&A! 

    What is your project type? Have you viewed the document: Disable code analysis

    Are you using an __EditorConfig __file to do a Code Cleanup? If an .editorconfig file exists for the project, those are the settings that take precedence.

    You can go to Tools > Options > Text Editor > Code Cleanup > uncheck the “Run Code Cleanup profile on save”

    If it persists, please share us the detailed build result in Output window. You can also check them in a new project. 

    Sincerely,

    Anna


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 
    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.

     

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.