开发者

Visual Studio 2010 debug not starting, F5 or click on "Play" not working, not doing anything. Waiting 2-3 minutes solves the issue

开发者 https://www.devze.com 2023-03-07 17:47 出处:网络
I have a relatively simple C# (Framework 4) console application. When I click the \"Play\" icon or hit F5 (i.e. start the program in debug mode), the icon becomes gray for a second, then goes back to

I have a relatively simple C# (Framework 4) console application. When I click the "Play" icon or hit F5 (i.e. start the program in debug mode), the icon becomes gray for a second, then goes back to green, but nothing 开发者_StackOverflow中文版happens. If I wait 2 or 3 minutes and try again, the debug session starts up normally, breakpoints are hit and everything.

Things I have tried without success:

  • Cleaning the solution, then rebuilding.
  • Renaming the output assembly.
  • Restarting Visual Studio.

The only thing that works is just waiting. I don't see any related processes still running during these 2-3mins (svchost, conhost, *.vshost or cmd).


try this: open Task Manager, go to processes tab and look for process named after your app. if its there just kill the bastard and try to debug again. for me it worked like miracle


I've seen this problem when my network connection is flakey and I've set the debugger to automatically download symbols from Microsoft's symbol server. It tries for a long time, then times out, then life proceeds. There should be clues in the Output window (where it normally lists all the modules being loaded and whether it got symbols for them).


Its happened for me.The cause was because i had my project open in 2 times in 2 differents visual studio and one was waiting for me to answers a question in a message box. The message was about files file was modified outside source editor and was asking me if I wanted to load change. Hope it will help some people and sorry for my english.


I my case, it's due to the use of a vshost. I don't clearly understand yet why. It's possibly due to the running platform (a Win7 x64 where I am not - and may not be - administrator) combined with other factors

But I can debug (using F5) if I disable the use of vshost via the "Project Properties > Debug tab > "Enable the Visual Studio hosting process".


This issue can also occur if you disable "Application Experience" service in Windows, as many system optimization sites suggest.

The service can be re-enabled using msconfig or services.msc, this completely solved the issue for me.


I had a problem like this. I was having problems using "run" when the network was involved.

I moved all of the files related to the program/solution to my local hard-drive (C:); they were on a network drive. Be sure to check the "References" (Look under the "Project" pull-down for the properties; then look for "References").

I would make sure all references are on you local hard-drive and set the "Path" correctly (to the reference on you local hard-drive) in the References tab. This seemed to fix the issue.


Check the Project Properties in the Compile tab, select the Advanced Compile Options.

If you are targeting the .NET Framework 4 Client Profile, you cannot reference an assembly that is not in the .NET Framework 4 Client Profile.

More information about the .Net Framework 4 Client Profile here


Apparently there are many root causes for this. In my case - opened an old application for the first time in VS2010. The solution was upgraded. Everything compiles without error - but app won't start. There are half a dozen class libraries linked to the application. Turns out one of them was still compiling to .Net Framework 3.5, whereas all the others had automatically upgraded to .Net Framework 4. Likely there was an error message in the conversion log, whose import I didn't heed at the time. Once I changed that last library to use 4 instead of 3.5, everything ran smoothly.


"Function Lock" ( Fn Lock) on some keyboards. This was completely unexpected, as I'd assumed I'd accidentally unset a key binding or something similar. Not so! - None of the function keys worked, then I noticed the tiny glimmering and baleful light of the Fn Lock key....


Enabling the Application Experience Service will do, i'm new to VB and encountered that one.


See what happens if you try "Release" instead of "Debug". If release works, then its because of a process (that you can find in Task Manager) which name is {Name of your Project}.vshost.exe
It's description is "vshost32" so you can sort by description alphabetically to find it easies.


It can also happen if an another application is attached to the debug process. Once, I attached ants memory profiler to the visual studio(VS2012) debug process. Later, I stopped the debugging and try to run it again, but VS2012 didn't allow me to debug. Only after stopping the ants profiler session, I was able to debug again.


I went to the services, found the service called "Application Experience" it was active.

I updated the service on right-click, and then right-click again, press "Reboot".

This worked for me. I am using Visual Studio 2015 on Windows 7 SP1 32bits.

But in the past I was using my application on Visual Studio 2015 at Windows 10 64bits.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号