VS 2022 can't build any projects

David Wei 0 Reputation points
2026-06-12T13:38:28.3333333+00:00

VS 2022 can't build any projects, it may relate with installed the gitHub Copilot and removed it. I reinstalled the vs2022 and clean the catch. the build is working well from Developer Command Prompt.

Developer technologies | Visual Studio | Setup

2 answers

Sort by: Most helpful
  1. Senthil kumar 1,120 Reputation points
    2026-06-15T08:59:25.46+00:00

    Hi @David Wei

    Press windows+R type 'devenv /resetsettings'. before execute close all your visual studio.

    this will reset every settings.

    Thanks.

    Was this answer helpful?

    0 comments No comments

  2. Lizzy Dinh (WICLOUD CORPORATION) 620 Reputation points Microsoft External Staff Moderator
    2026-06-15T08:31:32.39+00:00

    Hi @David Wei ,  

    Thank you for taking the time to share your concern with us. I truly appreciate the detailed information you’ve provided.  

    Based on the situation you described, I’d like to suggest the following troubleshooting steps that may help resolve the issue:  

    1. Start Visual Studio in Safe Mode   

    Please run the following command:   

    devenv /safemode  
    

    Then rebuild your solution. If it works as expected, the issue may be related to an extension.  

     2. Clean up any leftover files   

    I understand you’ve already tried clearing the cache, thank you for that. In addition, please ensure that any remaining .vs, bin, and obj folders are fully deleted, as leftover files can sometimes contribute to this type of issue.  

     3. Check build output for more details   

    Since no errors are listed in the Error List when rebuilding, reviewing more detailed logs may help:  

    • Open Output → Build  
    • Then navigate to Tools → Options → Build → Verbosity, and set it to Detailed  

    This can help surface more specific information about what’s happening during the build process.  

     4. Verify environment consistency   

    To help rule out any environment-related issues, please run the following commands in Command Prompt:  

    "C:\Program Files\Microsoft Visual Studio\2022\<Edition>\Common7\Tools\VsDevCmd.bat"  
    devenv   
    

    Once Visual Studio launches from the Command Prompt window, please rebuild your solution.  

    I understand that, without clear error messages, this issue can be challenging to pinpoint. However, each of the steps above will help narrow down the possible causes and guide us toward a resolution. Additionally, I recommend reporting this issue to the Developer Community here: Submit a report. This ensures visibility with the Visual Studio product team, who may step in if further investigation is needed.  

    I hope these suggestions are helpful as you continue troubleshooting. Please don’t hesitate to reach out if you have any updates or questions, I’m here to support you.  If you think my answer is helpful, I will appreciate if you can take some of your valuable time give feedback on my support following this guidance.

     Thank you again for your time and understanding.  

    Was this answer helpful?


Your answer

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