Pull down menus not appearing on Visual Studio 2010 after debug session - c#

I would like to continue running Visual Studio 2010 on a new Windows 10 PC, in order to maintain some older projects, which I'm not ready to bring across to VS2015 yet.
However, on windows 10, I find that all of the drop down menus (and right-click context menus) stop appearing after running after a debug session. The only way to get them back again is to exit visual studio and re-launch it.
When clicking any of the File/Edit/etc menus in the top bar, the item will appear highlighted, but the menu that should appear below is completely invisible. Note this is not the same issue that is talked about at https://connect.microsoft.com/VisualStudio/feedback/details/653315/ui-gets-messed-up (which seems to be garbled menus) - mine are not there at all.
I've followed the advice there anyway, to disable hardware acceleration in the VS GUI, but I'm still having the same problem.
Any suggestions?
ADDITIONAL INFO (Edit):
I should add that the PC (laptop) in question is a Thinkpad Yoga 460 with an NVidia GeForce 940M display adapter with switchable graphics (Intel HD Graphics 520).
I have tried using the NVidia control panel to force VS2010 to use the intel graphics, and I have also tried the reverse (forcing it to use the NVidia). The problem still occurs either way.
The menus stop working as soon as a debug session is entered (rather than on return from debug)

In the end, it seems one of my visual studio settings had caused the problem with the invisible/missing drop down menus.
I had imported all visual studio settings from my previous machine (using the Tools --> import/export settings option).
Resetting all Visual studio settings to defaults fixed the menus. I found that re-importing my settings, except for the "options" branch maintained the working menus.
I could dig further and try to figure out which specific setting from the "options" branch is causing the problem, but I'm leaving it here: I've got coding to do! :)

Related

Cannot Open Form [Design] View in Windows Desktop Form .NET Core Application

When I create a new Windows Desktop Form Application using .NET Core with the latest Visual Studio 2019 Community Edition update, I cannot view the design view of the form, i.e., Form1.cs[Design]. When I click on the appropriately labeled Form1.cs file, it only opens up the code view.
New Solution Open Form1.cs code view only
Edit: At the time the question was asked Microsoft hadn't released the visual designer for WinForms in .NET Core in Visual Studio 2019. It needed a separate preview install. By May 2020, Visual Studio version 16.6, the designer was still in preview but could be enabled from Tools/Options/Environment/Preview Features/'Use the preview Window Forms designer for .NET Core apps' without needing an install.
As of November 2020 the designer is still in preview, but is enabled by default in projects in Visual Studio 2019 version 16.8 and later. It's still not complete, particularly re data binding, but the number of issues is much smaller. It can now be disabled via the Tools/Options menu as discussed above.
Took me a while, but...
Apparently, according to this page, you can bring up form designer in the following mysterious steps:
In the Solution Explorer, look for the head toolbar,
Find the icon that looks like an empty HTML tag: <>
When you click it, it will disappear, which makes no sense, but then,
Your plus signs (tree expand buttons) on the left side of the files will be gone too - that's a good sign:
Now you can doubleclick on your Form1 (or whatever it's called),
And after a few seconds of thinking, it will open the Form Designer.
Why this?... I literally have zero idea. But it worked for me.
Maybe tomorrow I'll find out more about this and yes I promise to come back and update - until then, just follow this little yellow brick road. I hate the fact that in 2021 some of the modern tools require dark sorcery to operate on a basic level, but hey. We're in this together.
Good luck!
This thread is the first when requesting "c# visual studio 2019 cannot open designer", so the solution may be useful for those who have encountered an error when the WinForms constructor stopped opening in VS2019.
The screenshot shows the steps to DISPLAY the ERROR that caused WinForm to stop displaying
I found this trick worked for me:
Right click your project in Solution Explorer and select 'Unload Project' from the context menu (near the bottom).
Right click again and select 'Load Project'
Now when you double click on your form class, it opens in the design editor

Moving breakpoint in middle of debug session with VSCode

I am from Visual Studio land mostly working with C# applications. Recently switched to VSCode and it has been a . good experience so far. However, I miss a particular feature from that Visual studio has but I don't VsCode does have or at least I do not know how to.
With Visual Studio, I could move control from where it currently is to any previous position by physically clicking it and dragging it to a previous position. However, I do not seem to have that option with Visual Studio Code. Is there any way for me to enable that feature in VS Code for C#?
I believe still an open issue.
https://github.com/Microsoft/vscode-cpptools/issues/1025

Winform cannot be edited without fully breaking layout (2017 to 2015)

As I left home for a weeks holiday I decided to quickly zip+copy a project I have been working on from my pc to my laptop. It is a c# winforms application that I have been creating on my PC using visual studio 2017 community.
My laptop however uses visual studio 2015. If I just open the project on my laptop and run it, everything is fine. However the slightest change to the form (IE anything that causes it to save?) and when I run the application half my controls now anchor off the right hand side of the screen and are out of view.
I can restore the project back to working by replacing Form1.designer file with the original from my zip and rebuilding - but again any changes after that break it in the same way. The bizarre thing is the form looks absolutely perfect IN the designer, both when opened and unchanged and after changing regardless of how it looks when the program is executing.
Completely baffled and thinking I'm going to lose a week of leisurely work - any ideas as to what may cause this? I could try installing 2017 to see if its a going backwards problem but the free wifi at my location is.. lacking.

Memory leak with Visual Studio running alongside web application

I'm running a web application with models defined in C# and views being in HTML5, client-side business logic is JavaScript/jQuery. I've noticed something odd recently. Whenever both Visual Studio and my web application are running simultaneously, the browser memory usage starts to climb. It is worse in IE and Chrome, but likewise substantial in Firefox (all the latest versions of these browsers). Also, the memory usage of Visual Studio starts to climb. The CPU usage for the browser hovers in the teens, normally hovering around 0 otherwise.
Once I close down either the web application, or Visual Studio, the memory stops growing, and indeed, closing Visual Studio often allows the browser to run its garbage collection and clean up the mess. I suspect this has something to do with some sort of background debugging going on. I'm surprised that googling this hasn't turned up a similar issue for somebody somewhere in the world, and I suspect it's some kind of configuration setting in my IDE. Visual Studio 2013 Premium. I've reset my settings (Tools -> Import and Export Settings -> Reset all settings, with no effect. Building in Release mode likewise seems to have no effect. I'll keep hunting this one down, but has anyone here seen anything like this and resolved it?
edit: I have recently been debugging some dynamic code using the debugger keyword. I've commented that out, and am still seeing the same results. But I wonder if there isn't some lingering effect from using this in the first place?
edit: Updating Resharper from 8.2 to 9.2 didn't help either.
edit: Apparently this issue has been seen before and reported, if you just know what to google for.
Visual Studio has a browser link feature that causes the web app to poll Visual Studio in case you have changed a file.
In VS there is a small refresh icon in the debug menu with a drop down. In there you can disable this feature.
Did you trying running the application without debugging? (Ctrl+F5)
To enable VS debug the browser more info is needed specifically things like scripts and eval code are needed even after use. So, running the browser with debugging enabled will use more memory and cause memory to grow with time.

Visual Studio 2013 Update 2 - C# navigation bar drop down menus not working

In Visual Studio 2013 Update 2, my C# navigation bar isn't working when docked in the main VS window. The drop down menus don't open. I can scroll using the arrow keys when the menus have focus but can't navigate by typing a letter. When it isn't docked in the main VS window the menus work fine. I've uninstalled all extensions.
Can anyone suggest a solution?
I have the same problem in that the dropdowns do not drop down. However, I only get this when VS is running on my second screen. If I run on my main screen, the dropdowns work fine. Are you using a dual screen system? If so, maybe drag VS on to the main screen and see if it fixes it for you.
[Visual Studio editor dev here]
Yes, it's a bug we introduced in Update 2. Sorry about that, we are testing a fix right now.
This bug affects only monitors on the left side of the main monitor. So a workaround (as Paul suggested above) is to make the leftmost monitor the "Main display" (via Control Panel\Appearance and Personalization\Display\Screen Resolution) and then there would be no affected monitors at all.
If that doesn't work for you for some reason, the other workaround is to drag Visual Studio (or floating document window) to the main monitor or any monitor on the right of the main one.
[Update] This is fixed in VS 2013 Update 3 CTP2 (http://support.microsoft.com/kb/2933779/en-us).
I've also got the issue. And yep, using a dual screen setup. If I right click on the desktop and go to Screen Resolution and make the other monitor my "main monitor" it fixes it. Bizarre!!
I installed the latest VS 2013 Update 3 CTP and it fixed the problem for me:
http://support.microsoft.com/kb/2933779/en-us
In my case, the drop down control was minimized. I just had to drag it to resize again.

Categories