I have a background worker in my C# vsto excel add-in that reads data from an excel sheet. Recently, and for no apparent reason, Visual Studio hasn't been stepping through the background worker code correctly.
I have Visual Studio set to break on all exceptions. Previously, when an exception occurred or I hit a breakpoint, Visual Studio would break and I could step (F10) through my code, as normal. Now however, when Visual Studio breaks I can sometimes step once or twice, but then the background worker/excel will suddenly hang (Sometimes Visual Studio hangs too). If I pause execution and look at threads, I can see that none of them are in my code anymore.
I've tried this hotfix, but it hasn't helped.
Has anyone encountered this before?
Additional Info: I've used git to roll back to a version from before I was experiencing this issue, and it is now present in that version as well. This leads me to suspect it's something specific to visual studio.
The solution, from MSDN's Amanda Zhu, was to restore Visual Studio's default settings.
Navigate to \Common7\IDE (default is C:\Program Files \Microsoft Visual Studio 9.0\Common7\IDE);
and run:
Devenv.exe /ResetSettings: Restores the IDE's default settings, optionally resets to the specified VSSettings file.
Related
I work with Unity, and recently I came across some sort of bug with Visual Studio. For some reason one day the Script Editor stopped working.
When I first open it up through Unity, it would open as usual and seem fine, but after 5 seconds of interaction, Visual Studio would then freeze and crash without an error report. Following tries with the editor would just crash almost right away.
I did some research and found out that it was some sort of problem with Unity's MEF Cache, the Microsoft Documentation would ask me to do the following: Delete the following file: "%localappdata%\Microsoft\VisualStudio<version>\ComponentModelCache" and if the problem continues, I should run this line of code on VS' CMD as a administrator "devenv /setup".
I tried both methods with Visual Studio, but neither seemed to work, only to return to being fine for 5 seconds before freezing and crashing.
I have updated Visual Studio 2017 to the newer version and performed the same method, but the problem persists.
I would like to know if anyone have any solutions to my situation, if I should try reinstalling Visual Studio, try to reinstall Unity or just use another Script Editor.
edit: Just to inform, the version of Unity I was using was 2021.2.8f1. But I don't know if it matters since the bug didn't seem to depend on the Unity version.
I managed to fix the issue by installing Visual Studio 2022
I am running visual studio 2017 community version 15.7.6.
I am running an asp.net web application in debug mode. When I hit the "Stop" button to stop the debugger, it continues to run the program. I have to close Visual Studio completely to get the program to close.
Things I have tried:
Tools -> Options -> Projects and Solutions -> Web Projects -> Stop debugger when browser window is closed is checked.
Enable Edit and Continue under in the .csproj is checked.
I have closed IIS Express in the System Tray.
Running my application using the Visual Studio 2013 debugger produces the correct behavior, so this issue is just with the VS 2017 debugger.
Nothing works in VS 2017 except closing visual studio completely.
Does anyone know what is going on?
Right-click the IIS Express icon in the Notification Area (aka System Tray), then, under "View Site", hover over your web application. In the fly-out menu, choose "Stop Site". That usually works for me.
As far as I know, Visual Studio just does this sometimes and there's not anything you can do about it. If it's happening consistently I would try reinstalling and/or reverting to older versions to see if the issue persists.
Visual Studio 2013 (vs) compiles a solution fine when manually building (i.e., it reports "Build succeeded", there are no errors in the error list, and running a program shows the latest changes). However, when vs starts building in the background (for Intellisense?), then errors start to come up for recently added extension methods. The extension methods are underlined in red, and right-clicking on them to "go to definition" results in an error that says "Cannot navigate to [method name]".
Extension methods that were created (in the same classes as the methods listed in the erroneous error messages) previous to when this started happening do not show up in the error messages.
I have done a build clean, to no avail.
I do not have resharper installed.
How do I reset the intelisense cache in Visual Studio 2013? I see instructions for Visual Studio 2008, but not for Visual Studio 2013.
For Visual Studio 2015, my solution didn't have an .sdf file, and restarting didn't help. However, the following steps fixed my problem:
Close Visual Studio (important)
Go to [solution folder]\.vs\[solution name]\v14
Delete the .suo file
Start Visual Studio
It turns out that closing all open files, then shutting down Visual Studio, and restarting fixed the issue. pff!
I had a similar problem that I resolved by deleting *.sdf file in the solution directory. VS2013 will re-create it.
UPDATE This is what I know now: https://stackoverflow.com/a/38708050/90475
After testing all above mentioned solutions simply clean and build worked for me.
In VS2010, the only thing that worked for me was removing and adding the reference again.
Very old question, but it happened to me also with VS2019. I have multiple projects in my solution: right-click on the project -> "Unload Project" for each one, and then reload them. This worked for me.
Clean + Build, or
Close all the files + restart VS + clean
Those didn't work (for me).
Hi i have very weird problem. My Visual Studio 2010 crashes when i try to open user controls wrote with Devexpress 12.1.8.
I tried to uninstall whole program, deleted folders, cleaned registry but crashes still happens.
When i try to open user control a windows appears "Microsoft Visual Studio has encountered a problem and needs to close." I checked in event manager and i get this error:
Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AggregateException
Stack:
at System.Threading.Tasks.TaskExceptionHolder.Finalize()
One more weird thing about this situation is that after windows popup i can see that the control has opened in background.
What can i do to stop this error?
EDIT: I checked and it seems that i can open controls writed with devexpress 13.1.6. Maybye it is a problem with devexpress? Is there a way to totally uninstall devexpress?
It sounds like you might have a problem related to a third party package or add-in, possibly not DevExpress related. Here are some things to try:
Running Visual Studio as an administrator.
You can try running devenv /Resetsettings (see here) in a Command Prompt which should fix any corrupted settings
Try running devenv /ResetSkipPkgs (see here) which will avoid loading any problem packages.
Try running devenv /Safemode (see here). If it works in safe mode then the problem is most likely a third party add-ins or package.
You can also try Devenv.exe /log ". This will generate a file called ActivityLog.xml which might give you further clues.
If none of those help then try repairing Visual Studio from the Control Panel.
I am trying to break execution with Debug points in a Visual Studio extension running against a Visual Studio 2010 Experimental Instance.
For some reason, when trying to break execution, I receive an error:
"Unable to break execution. This process is not currently executing the type of code that you selected to debug."
Oddly enough, I can debug without any problem in a Visual Studio 2005, and 2008 Experimental Instance.
Has anyone else ran into this with VS 2010?
It sounds like the problem is that you're setup to debug only managed code in your VS 2010 project file. If you're setup to debug only managed you'll get this message if VS is currently executing native code (VS spends a good portion of it's time in native code).
To fix this do the following
Right Click on the project and select Properties
Go to the Debug Tab
Check "Enable unmanaged code debugging"
I re-installed Visual Studio 2010 and the SDK. This seemed to work at first, but after changing a source file and launching the Debugger, I was unable to break execution yet again.
I went to Tools->Options and unchecked 'Only build startup projects and dependencies on Run'. This fixed it! This must have something to do with an extension solution that supports both VS2008 and VS2010.