Visual studio 2010: Can't show design view - visual-studio-2010

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.

Related

Visual Studio navigate to source code outside the current solution

At this new company I joined there is a very big and huge multi solution product that I'm working on.
So sometimes when I'm looking through the source i have an interface that has an implementation that is within a project in another solution and when I Ctrl-F12 click that interface I get a "The symbol has no implementations." dialog box from Visual Studio, because it can't find the piece of code where the interface is implemented in.
Is there any way of like telling Visual Studio to just look in some specific directory for the code it's looking for without having to put everything into one giant huge solution that makes Visual Studio explode? I tried that btw and Visual Studio exploded.
While debugging the software there's no problem with the navigation because the debug symbols contain the paths to the source and stuff (if I remember that correctly).
I'm also using Resharper so if there's anything that Resharper can do to help there I wouldn't mind either.

Roslyn Code refactoring VSIX project -- How to add more to the VSIX?

I've created a visual studio extension with some nice refactoring features via a Code Refactoring (CodeRefactoringProvider) roslyn project, but there isn't really anything to it in terms of adding tooltips or menu items or doing something on startup.
If I wanted to do something like add a settings menu or tell the user that they're on a trial version, how/when could I even do it? Even though I'm working in a vsix, events don't seem to be exposed anywhere.
Do CodeRefactoringProviders run in a bit of a sandbox? Because I like the way it consumes my class, shows the user a preview and it fits into the editor amazingly, but of course I'd like more control because after all, the root of what you create is a VSIX which can do almost anything in the visual studio environment.
I'm sure I could limit the # of refactorings and show a popup.. but I'm fairly certain people would send death threats.
You can add other elements in just the same way you would in any other vsix in a Roslyn vsix. There are various ways to do this, such as creating a Visual Studio Package, using an ITextViewCreationListener, etc.
One sample that I created showed how to integrate a Tools Options page with a Roslyn code issue at http://code.msdn.microsoft.com/windowsdesktop/Roslyn-Code-Issue-with-84d792dd.

Visual Studio 2010 Macro - Reporting Progress

I have just discovered macros in Visual Studio and I can't be happier. Well... I have my complaints but... you know ;)
A few of my macros are taking quite a while to complete and I am looking for a way to track progress. I build a log file during most of my macro processes but I have not found a good way to report progress without pausing the process. Ex. MsgBox("Progress")
Any way to access the output window or even better the VS status bar?
I made a macro for Visual Studio 2005 which needed a form to choose between some options. I made that form from code and everything worked fine.
I think that you can do something similar. You can create a form with a progress bar and use that to track your progresses.
You could also use the visual studio designer to generate the code for you.

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.

VS2008 - Windows Form Editing Confuses VS

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.

Resources