Visual Studio freezing after debug session - c#

I asked this question before in Visual studio not allowing me to edit file after debug session and at the time resetting the visual studio settings helped and solved the issue. This problem has returned however. Everytime after I finish debugging, VS will not allow me to edit one of the files I am working on (I am working on multiple screens). Furthermore, whenever I finish debugging, a "Customize" window will pop up.
I will try clicking on the file I want to edit after a debug session but I will not be able to click anywhere. The only way I can access the file is through the arrow keys, but this is highly inefficient since I also need to use the arrow keys to scroll. This usually happens in the same file as well. The only way to fix the issue is to restart visual studio, which is inconvenient. I have tried resetting all settings but this only worked for a short period of time. Is there anything else I can try?

I have run into issues with Visual Studio where something takes the focus of from the keyboard/mouse. I have resolved it by hitting Esc multiple times until Studio comes back.
The other action to try is to install service update 4 for Visual Studio 2013. If it is already installed, install it again, but choose Repair. Reboot if necessary.

Related

After installing VS2015 Update 2 I can no longer view website unless I go in debug mode

Previously when I start website in debug mode and then stop debug mode website would still be visible if I visit like URL (like http://localhost:54123).
Now, I can only see ASP.NET website if I press F5 and stay in debug mode. As soon as I stop debug mode site is no longer available.
In previous versions of Visual Studio this was preventable by turning off Edit and Continue in csproj properties. But now it seems that option is no longer available. I've tried turning off Edit and Continue globally (from Tools -> Options) but this also doesn't help.
How can I configure Visual Studio 2015 Update 2 to act the same way as before update - if I start website I want it to run regardless if I attached debugger or not?
OK, seems this is well known bug that riled up everyone. So far the best workaround is using Detach All instead of Stop when you want to shut down debugger.
Other than that upvoting bug report seems like the only option:
https://connect.microsoft.com/VisualStudio/feedback/details/2562576/edit-continue-cant-be-disabled-which-causes-iis-express-to-stop-when-the-debugger-is-stopped
But knowing Microsoft this will probably take 6-12 months to get fixed IF we are lucky.
And to those who are tempted to just uninstall Update 2 and hope Update 1 will pop-up - it won't, I just wasted 2 hours on this and my Visual Studio 2015 was completely bugged. So, complete uninstall, clean install of VS2015-Update1 will work; just Update 2 uninstall - unlikely.
Visual Studio loves being a douche. These are the steps I take when it refuses to act normally..
1. Save your work
2. From the file menu close your solution
3. Close visual studio
4. Identify w3wp.exe or something of that nature in task mgr > Details(kill those)
5. Go to where you deployed that app, if its default it'll be in IIS > Default Web Site > "The name of your website". Click Explore under options delete the app folder
Reopen app Clean > Rebuild > Run
Should play nice now

VS 2015 Community - Not checking errors until build, errors do not go away

Intellisense will still give suggestions, but Visual Studio will not highlight any errors until I click "Start". I can write absolute gibberish and no red squiggles will appear. However, when I do click "Start", the Error List will finally populate and the build will fail. (It will also check errors after I click "ReBuild" or "Clean Solution").
However, when I do edit the errors, the red squiggles will remain. Even when I remove the entire line, a two space long red squiggle will remain. Clicking "Start", "Rebuild", or "Clean Solution" does not make these old error highlights disappear and the Error List does not change. Only closing and restarting VS 2015 Community will clear them. Rebooting the computer did not re-enable the error checking function.
System Details: This is a fresh install of Windows 7 Pro 64bit on a Macbook Pro with Bootcamp. This is the first project I have made since installing VS 2015 Community yesterday. I am writing a Windows Forms app using C#. To the best of my knowledge, it was working fine for a few hours this morning. I have already tried resetting all my settings. I have already tried rebooting and deleting the bin/obj folders in the solution directory.
Has anyone experienced such an issue? Do you think it is an issue with my install, or did my solution get corrupted somehow?
A few things to try that often fix weird Visual Studio problems:
Restart Visual Studio.
Delete the .suo file. This file should be right beside the .sln file, and is a temp file used for tracking things like which files/tabs you had open in the editor between sessions
Clear out some temp VS cache files.
Another thing you can try is running VS in safe mode to run with all extensions disabled. This may at least hint if the problem is native to VS, or if it's one of your installed extensions that is the problem.
Creating a new Project caused the error checking functionality to come back. I didn't even type any new code, I only made a new, blank project and everything started working again.
I have no idea why, but if someone else encounters this issue, make a new Visual Studio project and try re-loading your old one afterwards.

vshost.exe not terminating properly in Visual Studio 2015

I am in charge of testing VS 2015 and how it works with our current applications for my employer. We currently use VS 2013 for everything we have, so I know there are no issues there. The problem I am having is that it appears the vshost.exe isn't terminating correctly or something. I have not narrowed down the exact issue but so far that is what I believe.
Here is how I get my error:
Run my app in debug
Open a few windows
Hit the "Stop Debug" button (the little red square)
Clean Solution
Rebuild Solution
After my rebuild I get the following errors in the EXE:
Error Could not copy "obj\Debug\APP.exe" to "..\..\bin\APP.exe". Exceeded retry count of 10. Failed.
Error Unable to copy file "obj\Debug\APP.exe" to "..\..\bin\CRM.exe". The process cannot access the file '..\..\bin\APP.exe' because it is being used by another process.
If I open the Task Manager and manually end the vshost.exe process I can successfully rebuild again, no issues. If I take the same steps, however, I am no longer able to build.
I tested these steps in 2013 and did not have an issue.
Also note that disabling the "Enable the Visual Studio hosting process" does alleviate the issue, however I do not want to disable this option.
Has anyone else had this issue? I know we are still early in release. Any suggestions/solutions to try? Is it possible there is something wrong in our code (which I highly doubt since I would then get the error in 2013, most likely).
Thanks for any help I receive!
EDIT: This is a WPF application written in .Net 4.0 using C#. Also, I have verified that the issue also occurs if I exit the application normally (IE I open a window then close it with the shutdown mode on LastWindowClosed)
SECOND EDIT: This is a new issue that presented itself in Visual Studio 2015 with the addition of the new live diagnostic tools.
I have found that if I have the "Enable Diagnostic Tools while debugging" option enabled in the debug settings I get this error. If I disable this option, the error goes away. I am not sure if this is a bug in Visual Studio but I would assume so, unless I need to do something else to shut them down properly. If anyone has comments or concerns, feel free to leave a note.
Probably late for the original question (and I see that he had a workaround), but as per MSDN, VSHOST.exe is only an enabler for improving Debug performance or facilitates scenarios such as partial trust debugging. If you do not need that support or can bear the cost of starting a process and attaching the debugger on each debug session, go ahead and disable the hosting process from project designer -> Debug -> Clear the box "Enable Visual Studio hosting process"

Losing Focus issue visual studio 2013

I have a serious problem with my visual studio 2013
suddenly yesterday it began a "Losing Focus" Problem
I mean when I open visual studio it starts to lose focus every few seconds which is really annoying especially while writing code
and not just visual studio, but all other applications they start a loop of losing focus every few seconds but, once I close VS 2013, everything goes back to normal again
kindly help me with this issue as it's driving me crazy
This is simply because there is some "background working" application that causes this. Visual studio has nothing wrong with your problem.
e.g. showing a window (then losing focus) then hiding it immediately, so one cannot observe it.
Try using Task Manager to find out. Also, you can check start-up apps (with msconfig tool)

Debugging issue in VS2010

Okay , weird things are happening to me again. This morning when i started my ASP.NET application, worked on it a bit and now when i try to publish it. I'm getting served with an error where i can't seem to find any documentation on
Error 1 Unable to apply a change while debugging. Source file '\Properties\AssemblyInfo.cs' was reloaded. You must restart the debugging session.
Anyone knows what to do with this ?
Confirm that neither this instance of visual studio nor another is debugging the binaries in question.
Restart Visual Studio. This will usually fix the problem.
If that still doesn't work, try disabling all addons and restarting visual studio one more time.
Finally, as a last resort, reinstalling visual studio has a way of fixing seemingly unfixable problems.
You can try closing the ASP.NET Development Server. It will be in the system tray (next to time), just double click it and click "Close" then just run again.
Or you can open Task Manager and end the process of Image Name: WebDev.Webserver...

Categories

Resources