VS2008 - Windows Form Editing Confuses VS - visual-studio

We have a project in our solution that houses a test application with multiple windows forms. Every time I open up a form in the form editor, Visual Studio goes out to lunch, chewing up an entire processor... until I kill the process.
I tried to port over to a new project, thinking something in one of the forms, or the project file was causing the issue, but the new project exhibited the same behavior. In a new solution, though, the forms behave properly.
We did recently convert the solution from 2005 to 2008, but I couldn't find any similar conversion issues.
Anyone else experience something similar?

One of the operations which happens during form load is that form controls in your project which appear on the form are instantiated in the Visual Studio process. Given that they are running in the process it's possible for them to do bad things to Visual Studio like cause it to crash or hang.
You could rule this in or out by opening the form and attaching a debugger to visual studio and seeing if any of your controls are in a timely / infinite loop.

All projects get searched to find any custom controls to put in the toolbar, I don’t know if this is part of your problem.

Related

How do I rebuild an empty Visual Studio 2017 toolbox - WInForms

I am hoping someone can provide a little insight.
I am working with a Visual Basis WinForms application using Visual Studio 2017 on Windows 10.
I had a Toolbox with several custom objects.
While testing the application, VS completely froze. With no other alternate approach presented itself, I decided to abort VS via Task Manager.
When I restarted VS, I discovered that the Toolbox was empty. Not just my custom objects; in fact, all the standard objects were gone as well. When I clicked "Show Objects", I saw both the standard objects as well as my custom ones listed, but they were completely disabled (grayed out) and not selectable.
I researched several tickets regarding similar issues on StackOverflow and tried all the following approaches, without any success:
Clicked Reset Toolbox, deleted the toolbox ".tbd" files and
restarted VS.
Reinstalled, upgraded and restarted VS.
Changed the Project Type from Windows Application to Class Library and then
back again.
Restarted VS ("devenv.exe /ResetSettings", "devenv.exe /SafeMode")
If I create a brand new Windows Application, the toolbox builds in the correct items.
How do I get the toolbox to build correctly for my current solution/application? I do not want to have to create a brand new application as the application is an established and very large one, and rebuilding is not an option.
Any insights and/or suggestions would, of course, be greatly appreciated.
Thanks in advance,
Chris Fleetwood
cfleetwood#smartstart.org

How to collapse solution explorer view of razor pages?

I was coding with razorpages when randomly about 2 days ago the razor pages now display boths the cshtml and cs right away. earlier I could expand the cshtml to get to the cs file and i think it was a more compact that way
i think its options somewhere in tools->options->environment () but there are so many
after a few different google searches I found nothing helpful.
here is a picture of the problem:
earlier I could expand the cshtml to show the .cs files now i just see all of them and its kind of overwhelming.
enable file nesting in solution explorer
They're not being nested, is all. It's literally two separate files, Visual Studio just recognizes that it's a Core project, and then shows them nested, since it understands that they're related. If that's not happening, then that means Visual Studio doesn't recognize it as a Razor Page, which could be a problem with VS, the project, or something else entirely. It's essentially impossible to say what the issue might be, so you'll just need to try stuff. A few things I can think of to try:
If you're not using VS 2019, upgrade. Ultimately, this is part of the ASP.NET Core tooling, and best version of that is always going to be in the latest release.
Verify that you solution is building correctly. You might also consider deleting all bin and obj directories and rebuilding to ensure the build is truly up to date.
Close Visual Studio completely and re-open it. You may consider restarting as well. (You've probably already tried this though).
Try running Visual Studio in "safe-mode", which essentially just means disabling all the extensions you have installed. You can either manually disable all your extensions and then restart or close Visual Studio and start it via the command like with devenv /safemode. If this fixes the issue, then there's an extension causing issues. You'll probably need to just disable each one by one to see which on is causing the problem, and then either remove it or see if there's an update that corrects it.
If all else fails, repair Visual Studio. Run the intaller, and click the "More" link under the installation you're working with. Then click "Repair".

Visual Studio 2013 Aborting When Opening Property Sheets for Project

I don't know when this started, but I discovered that Visual Studio 2013 Update 5 aborts when attempting to open properties for a project within a solution. It seems to only happen when we have more than one project in the solution.
I've been able to reproduce it in two circumstances:
The first project is C++ and the second project is Fortran. Right-clicking on the first project and selecting Properties crashes Visual Studio without a crash dump or any kind of pop-up notification. Visual Studio just ceases to exist. Right-clicking on the Fortran project brings up the property sheet without any problem.
The second circumstance is with two projects, both C++. In this case, I'm able to open properties successfully for the first project, but not for the second one.
In every case I've tried where there's a one-to-one solution and project, it's working fine. A colleague who's working with VS 2013 Update 4 verified that the crash occurs for him as well.
We don't know when this started, but historically, we've opened these property sheets many, many times. However, it's probably been a few months since I've worked on a mixed-language process, and same with my colleague.
I've turned on logging and there was a complaint in the log about two versions of the Desktop SDK having the same internal ID. I removed one of those altogether, but that didn't seem to affect anything. It's also not clear if that error has any relationship to the crash.
I've also done a repair on Visual Studio, and that did not correct the problem.
I've also tried deleting the .suo and .user files. Again, no luck.
I've done quite a bit of googling but haven't found anything that matches this specific problem.
Any ideas?
Thank you,
Doug

Visual studio 2010: Can't show design view

I have an problem in Visual Studio 2010:
I created an custom user control, that show some data, then I tryed to add it on a page.
When I did this, this error showed up... when I run (start debugging) my application, everything works fine, the only thing that is not working is Visual Studio design view.
What should I do to solve this?
Your control is displaying data - if it tries to get that data from a remote database (for example) that's not available at design time then this could cause the problem.
You need to either modify your code to cope with the data source being missing (probably a good idea anyway) or wrap the code in a "is this design mode" check.

VS.net 2008 issue with asp.net pages

I am having problem in using the source view of an asp.net page in VS.net 2008 IDE. I am not using Design view at all. IDE hangs a bit every now and then, when I use intellisense in it, and I scroll the page.
Please throw some light on it.
Such issues doesnt come up while editing the HTML page, and while editing same asp.net page with the HTML editor which can be configured using Tools -> Options menu option.
Read this Post
This might help to make your visual studio a bit faster in general. I am not very sure about the exact reason for the behavior you mentioned of your Visual Studio.
I suspect that it has something to do with Graphical Interfaces like Toolbox etc.
Thanks
I've had problems like that with Visual Studio before. The intensity of the problems seem to multiply exponentially as the size of the file I work with gets larger.
Here's what I'd reccomend:
Check and make sure Visual Studio is fully updated (Help > Check For Updates) ; there have been some patches released and they will help you immensly!
If your code has any breakpoints, disable them all and start afresh later (Debug > Disable All Breakpoints)
If that fails, here are some more optimizations you can try.
In my case, I think longer file is the culprit. I think partial page concept should be applicable to asp.net page too.

Resources