That worked with my App.
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".
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.
Developer technologies | Visual Studio | Debugging
Windows for business | Windows Client for IT Pros | User experience | Other
4 answers
Sort by: Most helpful
-
-
Tianyu Sun-MSFT 34,446 Reputation points Microsoft External Staff
2024-11-05T04:51:18.41+00:00 Hello @Chris Hurtig ,
Please try to clean some debugging related cache files first. Remove following, manually:
- Close VS, remove
bin
,obj
and the hidden.vs
folder in your project folder. Restart VS, rebuild your project and then run/debug it. -
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
inDeveloper 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.
- Close VS, remove
-
TANISHA SONI 0 Reputation points
2024-11-28T06:26:08.1066667+00:00 -
Hung Nguyen 0 Reputation points
2025-06-08T23:17:32.91+00:00 This was fixed for a while but the latest windows update (KB5058499) has brought this back.
Seriously, Microsoft?