I'm running Windows 11 24H2 and using Visual Studio 2022 Professional. When debugging my program, it fails with "Error while trying to run project: unable to start the program".

Chris Hurtig 20 Reputation points
2024-11-04T16:48:00.14+00:00

However, this is working on my laptop just fine. It has Visual Studio 2022 and runs this same debug without issue. I think it is related to windows 24H2, but can't be sure. The program I'm debugging hasn't changed so it related to something else. I am able to go into debug on some visual studio projects, but not all.

Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
1,016 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,455 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Tianyu Sun-MSFT 32,406 Reputation points Microsoft Vendor
    2024-11-05T04:51:18.41+00:00

    Hello @Chris Hurtig ,

    Please try to clean some debugging related cache files first. Remove following, manually:

    1. Close VS, remove bin, obj and the hidden .vs folder in your project folder. Restart VS, rebuild your project and then run/debug it.
    2. C:\Users\username\AppData\Local\Microsoft\VisualStudio\17.0_xxxxxxxx\ComponentModelCache folder(remove/rename the ComponentModelCache folder, restart VS).

    If the issue persists, consider repairing VS and resetting VS settings.

    About repairing VS: VS Installer > More > Repair

    About resetting VS settings: close VS and run devenv /ResetSettings in Developer Command Prompt for VS 2022.

    I think it is related to windows 24H2, but can’t be sure.

    I test locally, but till now, I fail to reproduce this issue.

    Feel free to let us know the results.

    Sincerely,

    Tianyu


    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.


  2. TANISHA SONI 0 Reputation points
    2024-11-28T06:26:08.1066667+00:00

  3. Jeffrey Folk 0 Reputation points
    2025-01-19T04:17:30.3+00:00

    Their Visual studio not working correctly in Windows 11 Home is breaking all kinds of software.

    Pieces missing on the interface GUI makes it impossible to use.

    This shit is broken in windows 11 home and they fucking know it!!!!!

    ASS HATS! Oh it your anti-virus well I got one to thing to say it is Microsofts ANtI-Virus Problem then!@ asshats...Fix this shit!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Backwards Compatibility My ASS!!!!!!!!!!!

    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.