Unable to start debugging because the object invoked has disconnected from its clients
Visual StudioDebuggingVisual Studio Problem Overview
I'm running Visual Studio 2012 (version 11.0.61030.00 update 4). When debugging a local console application I get the following error when I start debugging (F5):
---------------------------
Microsoft Visual Studio
---------------------------
Error while trying to run project: Unable to start debugging.
The object invoked has disconnected from its clients.
---------------------------
OK
---------------------------
This only happens if I leave visual studio alone without debugging for a couple minutes. If I close visual studio and re-open the error goes away (until I leave it untouched for another couple of minutes). Has anyone experienced this? I can't find any threads of other people experiencing it.
Visual Studio Solutions
Solution 1 - Visual Studio
This may be a possible answer for the problem.
Some from the answer:
- Check which files were changed (why and how) after update from a source control engine
- Review the list of extensions and plugins. Try to disable all or some of them
- Close Visual Studio and kill all the development processes:
devenv, mspdbsrv, vcpkgsrv, msbuild, msvsmon, vshub, vstest
etc - Remove
.suo, .ncb, .VC.db, .VC.VC.opendb
files of the solution as well as.vs
directory, which sometimes cause problems - Remove project setting files, sort of
YourProjectName.vcproj.DOMAINNAME.LOGINNAME.user
orYourProjectName.csproj.user
. The setting file name depends on a project kind you use - Run
"C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" /setup
or"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" /setup
for x64 environment
Solution 2 - Visual Studio
Just Close the VIsual Studio and start again the project.Its work Perfectly for me. Thanks
Solution 3 - Visual Studio
While restarting Visual Studio does provide a workaround, it doesn't solve the actual problem. In my case, I was working with a C# solution in VS2017 and the following resolved the issue:
- Close Visual Studio
- Delete the .vs folder that was created in the Solution's directory
- Re-open the Solution
Solution 4 - Visual Studio
I corrupted my App.config file with NLog settings without section Handler in the top of the document. Gist is check out your config file settings either corrupted in format or not properly handled any section. once I remove corrupted config section, it did not raise the error again (VS 2017) Hope it helps!
Solution 5 - Visual Studio
In my case I have just reinstalled Windows 10
and so the Visual Studio 2022
..
My project was targeting .net 5 SDK
, but I only had .net 6 SDK
installed. The solution was to install earlier version of the SDK
.