Visual Studio 2015 is freezing when writing code in C# - c#

Every time I attempt to use a C# keyword (such as if, else, continue, break, etc), Visual Studio freezes and displays the following message:
"Microsoft Visual Studio is Busy:
Microsoft Visual Studio is waiting for an internal operation to complete. If you regularly encounter this delay during normal usage, please report..."
It freezes for about 60+ seconds, and will freeze again as soon I type out another C# keyword.
Any ideas on how to fix this issue? I've scoured the internet and am having all sorts of issues finding a solution.
Thank you!

I would recommend trying to kill it with task manager and start it up again. This won't delete any saved work, and it should stop any internal Visual Studio Operation. You could create a new text file and copy/paste unsaved code into it so that by killing Visual Studio, you aren't losing anything.

So I found another solution that seems to be working. Unfortunately, it appears that IntelliSense is causing the issue. I went into Tools > Options > Text Editor > C# > IntelliSense > and uncheck "Show completion list after a character is typed". This seems to resolve the issue.

Related

Visual Studio freezing after debug session

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.

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)

Can't built my Console Application

From time to time I receive this error message when I'm debugging my Console Application:
The process cannot access the file 'bin\Release...' because it is
being used by another process. Exceeded retry count of 10. Failed.
The fact is that it's not running and Visual Studio keeps showing this message, and so I have to restart it and build it again.
The process is NOT running, so there is no reason to receive this error.
Does anyone know why this is happening?
Verify that nothing has changed the file permissions, and the file isn't read-only. Verify that you cannot delete the file yourself. If so then yes, something is blocking it.
Download handle.exe, which is a command-line tool that shows you what process is locking a file.
If handle.exe says nothing is using your file, or it says devenv.exe is using it, then I think you have hit that intermittent bug in Visual Studio. Your only option is to restart Visual Studio. If you do a google search for "used by another process" with site:connect.microsoft.com you will find that this bug gets reported, then fixed, then reported, then fixed - over many years. Personally, I have had this happen most often on VS2010 using WPF projects. It has yet to happen to me on VS2013. So upgrading might help.
Here is my Google search.
If the process is not running, I suppose Visual studio is the process that uses bin\Release.
If you want to know exactly what the problem is, delete everything in the folder (if possible), the file that will not be deleted will be the one that is used by Visual Studio, this will already be a good indicator.
I'm not sure why you are debugging the release build?
When this happens, it usually is due to being opened i.e. the console window that has ran the app is still open, or it is still in the process of closing.
However, again I feel it's due to debugging a release built application.
I had a similar issue in the last couple of days. The reason this happened to me is because I was testing a Windows Service I created. When I forgot to stop the service, and tried to build, I got this error.
Follow the suggestions in the other posts. As well, you may want to download Process Explorer from Microsoft - It might give you additional insight and allow you to kill any linger process.
What version of Visual Studio? You tagged it as VS 2013, correct?
Did you look at the following threads at Microsoft? Many complaining about similar issue.
https://connect.microsoft.com/VisualStudio/feedback/details/533411
http://connect.microsoft.com/VisualStudio/feedback/details/811846/visual-sudio-cant-complie
http://connect.microsoft.com/VisualStudio/feedback/details/647826

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