How can I determine why Visual Studio 2008 is hanging? - visual-studio

Visual studio is just hanging. The GUI just sits there and the CPU is at or near 0%.
I've let it sit for close to hour to see if it would resume, to no avail.
What is weird, is that the GUI doesn't respond to clicks anywhere, however, it re-draws correctly. If I drag another window over it, after the window passes over a portion, it is re-drawn correctly.
At the bottom of the VS window, it sometimes says 'Analyzing database schema. Your database projects will be ready after 5030 operations are completed', however, the GUI has hanged without it there.
I'm not sure if this is the cause or not.
I've tried /safemode, but I need the DB functionality loaded and using /safemode disables them.
I'm at a loss really.
More info -- The window stays as an unselected window even when I click on it. It's as though the whole thing is suspended except for the fact that it is redrawn properly when something else passes over it.

It might be worthwhile to delete all of the temporary files (.ncb, etc.) that get created within your solution directory, and let VS re-create them. Sometimes they get corrupted.
The next thing I would do isto use ProcessExplorer to see if I can identify a thread that seems to be hanging, and whether it's in a particular module.

Related

Visual Studio always closes Output window when build starts

I have a weird problem with Visual Studio Premium 2013. VS has taken to closing the Output window after my build starts. If the window is unpinned, it briefly opens at the start of the build, and then auto-hides. If it's pinned, it briefly gets selected, and then moves to another pinned window (it usually opens the Error List window and switches to that). The one thing it always makes sure of is that it switches away from the Output window. This is a behaviour that has started recently and I have no idea why - it didn't used to, and I don't remember changing anything related to this behaviour. Here's my settings, which should cause the Output window to stay open:
I've even tried deleting the solution's .suo file, but this problem persists.
Can anyone tell me how to get the Output window to stay open during a build again?
Well, I think this has something to do with the fact that the solution I'm building does a bunch of automated stuff, including the building of some .tt files. It's not a configuration issue in my Visual Studio because the Output window doesn't disappear when I'm building a new simple project I create from scratch, so I guess there's probably nothing I can do to stop the Output window disappearing for this project.

Visual Studio designer stops recognising changes occasionally

Using VS2008 visual designer occasionally the designer seems to stop recognising changes. Normally you get a * next to the filename in the tabs when a change is made but sometimes this stops appearing when I am making changes. When this happens may changes are getting "lost" so if I close/reopen the file all my changes are gone.
Has anyone else encountered this and know why it happens and if there's a fix/workaround?
Cheers.
We ran into a similar problem in Visual Studio 2010. When attempting to resize a user control, the designer simply refused to recognize that a change was made (no * shown), and when you rebuilt, all source file changes were lost.
I found this link from another person having the same problem.
After stepping back through source control and comparing the .designer.cs file for the user control and its child controls, it turned out to be the same problem. At some point, the line:
this.components = new System.ComponentModel.Container();
disappeared from the designer file of one of the child controls (not the user control that I was having problems with). Incidentally, within that designer file, all of the references to "this.components" were also removed.
After fixing the child control (restoring the creation of this.components, and fixing the original references), the top level user control then started recognizing changes again.
We're not sure what caused the corruption of the child control. Perhaps it was a source code merge or a designer bug.
It's a very difficult problem to debug. Even if you attach a debugger to debug the design time behavior of the user control (and its children), there are no exceptions thrown and there is no indication that anything is wrong.

Test view keeps dissapearing in visual studio

I have visual studio 2008 TS both on my laptop as on my desktops(work & home).
For some reason the one on my laptop keeps removing the test view window from my window lay-out.
I can put it back by going Test=>windows=>test view, but as soon as my test run ends, the window is gona again. Quite anoying since I can't see the test results that way.
any ideas on how to fix it?
Try doing "Reset" to your views (i.e. all the windows, placement and which are open), and re-arrange them all over again. It worked for me when my "Pending Changed" window kept re-duplicating and/or disappearing.

Why does my VB6 IDE loses its buttons and menu items?

I still have to use the VB6 IDE.
Unfortunately every time I start the IDE one of the buttons of the toolbar disappears. Almost always it's the Run button which goes first. Sometimes also items from the menu bar or the context menus are missing.
I have to reset the toolbars almost every time I start the IDE (Which is quite often during a typical work day). Recently I bought an IDE plugin which modifies the menu bar and requires a restart after every reset of the menu bar. (Otherwise it would crash)
I could live with just the resetting, but the restart is really annoying.
Is there something I can do?
To solve this problem:
Unload all add-ins.
Right-click on a toolbar and select the Customize... menu.
For each toolbar click the Reset... button (6 times in total).
Reload the add-ins.
For me action 3 was enough.
cf. MZTools faq (thanks to Andrea Bonafini), but these steps are originally from MSDN
It sounds like you recently bought a bad add-in. Can you get your money back? Every time I've had problems with disappearing controls in the IDE it has been due to a bad add-in. You can find out which one it is by disabling them, one by one, each time using the IDE for a while, then re-enable it and disable the next one, until the problem stops.
I still use one problematic add-in. It exhibits behavior similar to yours in that it makes the run button disappear. I avoid the problem by only loading the add-in when I need it, use it (it formats code), then I immediately unload it. If you don't use the functionality of the add-in that often, this could be an acceptable workaround.
Yea, i have this same problem with one of the add-in. But if you reset it. Shut the IDE down and open it back up again without doing anything, the IDE shouuld be able to retain the previous clean setup.
It's just guest, but:
Each graphical element on IDE (like button) is kind of resource (i.e. GDI handle).
Maybe your VB app doesn't manage these resources good enough and after sometime VB IDE cannot redraw elements like buttons (run is used often).
Also, maybe some IDE add-in is in conflict with some other add-in/application and breaks something -- I have this problem with Clip-X and MZ-Tools.
I had a similar problem when I was setting up the IDE to use for the first time, though it may not be helpful if you've been using the same IDE for a while. When I first started using the IDE, I would modify the toolbars and then close the IDE. When prompted if I wanted to save the open file I always said No, since the file was just a dummy file I was using to open the IDE with. Turns out the IDE was saving the toolbar preferences with that file, so they never got saved.
Try opening a file, customizing the UI, saving the file, then closing without modifying the code. This was the solution for me.
I've tracked down the problem and as suggested it was an add-in.
The problem went away as soon as I disabled the Visual Basic 6 Resource Editor.
How to restore your VB6 IDE without reinstalling:
Run Regedit
Find the entry for Visual Basic 6.0
Export your settings in case things
go wrong
Delete the 'UI' setting
Run VB and you will have your popup
menus back
The 'Find' button disappeared from my VB6 toolbar forcing me to select the Edit menu to use Find. I had two add-ins enabled: vbCodePrint and ResourceEditor; so I did away with both of them, turned VB6 off and back on, then put both add-ins back in and my button returned.
If you're still using the VB6 IDE, and I do amongst others, then this problem is not likely to have gone away. I use VB6 in Windows 10, and the problem is still there. But it doesn't affect me anymore.
I have had this problem a few years into using VB5 and VB6. Today, if I start VB6 directly, it may work fine the first time, but buttons will go missing the second time -- ALWAYS.
My solution, which I developed from day one:
Do whatever needs to be done to restore all your buttons. Save the Visual Basic 6.0 registry settings to a file, as suggested previously, and only keep the UI entry. Sometimes, you have to exit VB6 for it to post changes to the registry. So if this doesn't work the first time, try exiting before saving the settings.
I use my own program to launch VB6, which automatically copies my VB6 registry backup back into the registry -- by calling "RegEdit.exe /S D:\VB\IDE_Fix.reg" -- before I launch the IDE . This works every single time, and requires no action on my part.
If you read this, that means you are a programmer. You can make this work by yourself.
Mike
Reinstall,clean registry and update with SPacks etc....

Visual Studio 2008 Window layout annoyance

I'm having a weird issue with Visual Studio 2008. Every time I fire it up, the solution explorer is about an inch wide. It's like it can't remember it's layout settings.
Every un-docked window is in the position I place it. But if I dock a window, it's position is saved, but it's size will be reset to very-narrow (around an inch) when I load.
I've never come across this before and it's pretty annoying. Any ideas?
The things I've tried:
Saving, then reloading settings via Import/Export.
Resetting all environment settings via Import/Export.
Window -> Reset Window layout.
Comination of rebooting after changing the above.
Installed SP1. No improvement
none of which changed the behaviour of docked windows. (Also, definitely no other instances running..)
I do run two monitors, but I've had this setup on three different workstations and this is the first time I've come across it.
I had the same problem. It turned out that if the VS window was non-maximized, it was really
small. So after making the non-maximized wider, the problem disappeared.
I occasionally get this bug, and others related to layout/fonts/colouring etc. A little trick I've found is use the Tools -> Import and Export Settings, export your current settings once you've got everything setup as you like, then close and reopen Visual Studio and import. Hopefully that'll sort you out.
In 2005 there were some little bugs with viewing Project/Solution property panels when the Solution Explorer wasn't in its default position, docked on the left of the screen - I don't know if that's changed in VS2008, but you might want to put it back there and see.
Now, when are we going to get decent MultiMonitor support?!
Maybe you're closing Visual Studio while some other instance is still alive. The settings of the last instance that is closed is the one that will be applied.

Resources