Visual Studio 2010 text turns blue and red at seemingly random times - visual-studio-2010

Many times a day, on a new work computer, Visual Studio's code window turns red and blue all of a sudden! The problem only goes away if I restart that instance of Visual Studio or re-apply the fonts & colors settings, closing and opening a file/tab doesn't help.
Only the currently visible file gets the glitch at first when it happens, other open tabs generally retain their proper colors until I reopen them or I open new files - which are then shown with the glitched colors. Sometimes certain types of text in other open files turns blue though, like a virus spreading ;)
I'm guessing there's a plugin or a missing hotfix or glitchy graphics driver but I haven't figured out what the problem is yet and it's driving me nuts.
I've had this problem once before but don't recall how I fixed it, it's been a while since then and I have many similar installations since that's not showing this issue.
There's also a Microsoft Connect issue on it that is closed with status "cannot reproduce" - and it's easy for me to reproduce by simply launching IE9. Sometimes, however, the problem appears without me launching IE.
Visual Studio 2010 SP1 on Windows 7 SP1, ReSharper 6.1 and Reflector 7.5.4.20. I've disabled hardware acceleration in VS with no difference, it's an Nvidia Geforce 210 with a dual screen setup with primary screen on the right. Also, the markup shown is not written by me and contains no sensitive information

This seems to be a small hiccup with the dark theme in Visual Studio. It happened to me when I did a system resume with the VS project still open. The solution to this is just restarting Visual Studio. Works like a charm.

It seems it actually helped to update Nvidias graphics driver, even though it was just a few months old and for quite an old and trusted graphics card. Oh well - now I'm happy that the problem is gone, and upset that it was so easy.

Found this be searching for an answer to the same issue.
They way I fix it is to open Tools -> Options and then click on Environment -> Fonts & Colors to reset the coloring for the current buffer.
It appears to be VS is not recoloring the current buffer after locking the screen for at least 4 mins. I believe this to be a bug in the themes handling in VS, but I this is really the only place I could find this mentioned.
Just installed SP1 for VS 2010 hoping that it will help, but it does not.

I faced the same issue with vs2013...
This solved the issue..http://madskristensen.net/post/visual-studio-update-2-and-web-essentials

Related

Visual Studio - Designer process terminated unexpectedly

After opening project (new or old) Visual Studio shows warning "Designer terminated unexpectedly" (can see in the picture below). What could cause this error? And how to fix that?
I clicked "click here to reload the designer" and it shows the same error.
I had the same issue and found out that my Oracle VirtualBox causes the issue.
My Visual Studio runs in a virtual Windows 10 enviroment.
After I disabled "Enable 3D Acceleration" in options Display, my Visual Studio Designer worked fine again.
I just had a similar problem. Tried:
Clicking to reload the designer
Cleaning my solution
Restarting Visual Studio
Repairing Visual Studio
Uninstalling and re-installing Visual Studio!
It ended up being graphics related, as you mentioned.
I have hybrid graphics (Intel and NVIDIA), and was using NVIDIA for Visual Studio. Changed it to Intel and this worked.
If it helps, a screenshot of my NVIDIA control panel is below:
Before (broken):
After (working):
Some people have found a file "c:\program" that causes this, often created by typo creating a log file.
Check to see if this file exists, and if so, move or delete it.
Graphics card was the problem for me. I have an external USB video from DisplayLink and when I disconnected it the problems went away. in fact it didn't return when I reconnected the displaylink.
Start Visual Studio As Administrator~!
I had the same problem when i started working in Team Projects, so almost everything did not work including the designer, properties menu, debugging and so on.. (which is totally unusual for anything to cause all these problems except for Administrator Privileges issues probably in most cases).
Don't know why or what caused it, but at least it works.
In my case it was the problem with using system brushes as ThemeResource. Yes this is apparently a bug like other odd bugs in MS products. So I had to comment out them until I finished my project. I don't know, maybe another factor such as my graphic hardware was not ineffective but this does not exonerate MS.

True-type fonts that I installed not rendered in Visual Studio 2010 Text editor

I am trying to change the font for the Text Editor in VS 2010 Ultimate on a machine running Win XP Professional SP3 (32bit), and it does not render any installed fonts correctly - works fine with the default fonts though. (At first, I thought it was only with Monaco font, but I recently realized that it's more than that.)
I have tested with some fonts, including Inconsolata, Futurist fixed-width and Monaco on my PC, and if I change the font to any true-type font that I installed, the font renders as Consolas although the font name in the Fonts and Colors window shows the new font name.
I was successfully able to apply Monaco font on a colleague's machine (we both have the same OS and VS editions). I could also change the font in VS 2008 on my machine, that looks fine as well. Also, I can change the font to any of the above said fonts in my MS Word and Excel applications, so I don't think it is a system-wide problem.
I came across this very old post on SO that addresses a similar issue (which might not even be relevant to the 2010), but I did try some of the techniques listed for what it's worth without any success.
This is what I did so far (not necessarily in the same order), and nothing worked -
Resetting the Visual Studio as per the suggestion in the comments
Restart the IDE after installing the font
Close VS, un-install and re-install the font, and open VS again
Open VS in safe mode, disable the extensions, re-open VS again
Repair/reinstall the Visual Studio
Is it a possibility that my VS is corrupted? (If that's the case, wouldn't repairing have fixed that?)
I also learnt from a Microsoft Connect bug that VS 2010 text editor has been rebuilt using WPF - could that be what is causing the issue? The strange thing is, I can successfully set the environment font (the font for VS menus, solution explorer window, etc.) to any font I like - I cannot set the font only for the windows where we can type text, like the Text Editor, Watch window, Immediate Window, etc.
Did anyone else come across this kind of problem? Does anyone have a solution? I am out of ideas now, and my last resort seems to be uninstalling VS completely and re-installing (but again, I am not sure if that will work either).
The issue looks to be with the way I had Visual Studio installed on my machine - last week, my PC started freezing and giving the fabled BSOD all of a sudden - the tech support guys suggested to re-image the machine, which I reluctantly agreed to since that was the cure-all for my aging machine. Today, the support engineer stopped by and swapped my existing hard drive with the new one they built for me - they had been kind enough to push my current applications onto the new image.
After the swap finished uneventfully, and the support guy did some sanity checks and gave a thumbs up, I installed the Monaco font again (from the same source as I did originally), and applied the new font, and opened a new project - and, lo and behold, I now see my code in Monaco font! Feels good to see Monaco font on my machine - this has been eluding me for about 8 months. I still am not sure what fixed the issue, but I am glad I could finally put an end to the frustration I had been having.

Scrolling in Visual Studio causes text to become unreadable

Since the past week I'm having a very bothering issue that blocks me from using Visual Studio.
For instance, here's what I normally see:
But as soon as I scroll a bit down (either with the arrow key, mouse wheel or the scroll bar), this is what I get:
As you can see, part of the frame seems to be "locked" in the screen.
The only way to see it right, is to make some other window cover VS's window, then going back to VS I see it right.
This is what I have tried (checking if the issue was solved after each step):
Check for updates
Repair VS2010
Remove R# and any other extension/add-in
Reinstall R# and any other extension/add-in
Remove VS2010 and any related software
Reinstall VS2010 + SP1 and updates
Remove any other unused software
Remove any recently installed/updated software
Run CCleaner
None of these steps solved the issue.
This happens only with VS2010, regardless the project or solution I'm opening.
I think you need to start looking beyond Visual Studio for issues. The next thing I'd look at is your graphics driver. Make sure you have the latest available version.
I have the same problem with VS 2012.
Scrolling up and down, does not refresh sections (rectangles) on my text editor view.
(unfortunately I've not enough reputation to post a screenshot.)
I managed to workaround it in VS 2012, by floating the editor.
i.e. Right Click on a file tab / Float All.
Otherwise I tried everything posted here, without any luck.
Hopefully someone out there knows how to undo this magic.
I had the same problem and it was due to the DameWare Development Mirror Driver.
I disabled it and the problem went away.
I'm having the same issue in VS 2015 pro.
Setting the editor windows to float fixes the problem which definitely looks like a bug in visual studio.
I'm on a Citrix virtual Desktop and the problem appears to be that a "column" of the editor (on the left side) is not redrawing properly after scrolling right, left, or down. For some reason scrolling up is fine.
For me, using VS 2013 Pro, the cause was having the JAWS Screen Reader installed, which, ominously, included a video interceptor. Once uninstalled VS started working normally again.
I had this same problem and it turns out it wasn't a graphics driver issue. The company I work for uses software that acts like a virtual monitor to remotely log into our PCs to install software and fix problems. It turns out that this extra virtual monitor was the problem. Disabling it fixed the scrolling in Visual Studio.
I had the same problem in Visual Studio 2017. When I changed the color theme to 'dark' the problem seemed to be fixed

Odd artifacting problem only in Visual Studio

This has been happening pretty consistently in the past 24 hours, it seems any time intellisense comes up visual studio gets these black garbled rectangles all over it. I thought this was a video card issue so I swapped it out for a new one, and the issue persisted. Has anybody seen this problem before? Sorry if this isn't exactly code related.
If it is enabled, you can try turning off Hardware Acceleration in Visual Studio under Tools > Options. Make sure to check "Show All Settings" as well.

Why is Visual Studio 2010 changing my Design window positions after returning to Design mode from Build mode?

I have been having an issue with Visual Studio 2010 that is driving me completely bonkers. The general problem is that Visual Studio 2010 does not seem to be remembering my window positions. (Visual Studio 2010, v.10.0.40219.1 SP1Rel on Windows XP SP3.)
Now, I am aware that Visual Studio 2010 has different window layouts for Build and Design mode. I have come to accept this as there are some things in life I cannot change. If I could turn off this feature, I would be over-joyed, but I do not think it is possible.
My biggest issue at this point is that Visual Studio 2010 doesn't remember the window positions in Design mode after going into Build mode and returning to Design mode.
Here are some screenshots to illustrate this issue:
Imagine me coding. OK, time to build.
OK, the window layouts changed. This is annoying, but whatever. Let's go back to design mode.
This looks OK, but WAIT -- why don't the windows return to their previous position?
I'm using a small Visual Studio window size here, but as the red box shows -- there is a difference. Why does this happen and what can I do to fix this issue? It is driving the OCD in me completely nuts. It doesn't look like a big change in these screen shots, but when I have my VS instance maximized across my two monitors (configured to display as one continuous desktop, instead of two desktops) -- it's a very noticeable and annoying change.
Possible problems that I thought were causing this issue:
I store my working copy in a Dropbox folder. I work from that dropbox folder. However, I've tried this same issue with Dropbox turned off and reproduced the above issue.
Corrupted settings file. I tried this with a new MVC application, saved it outside of the Dropbox, and the same thing happened.
Windows XP issue. I know I need to upgrade, but unfortunately that is not always an option. If Windows 7 doesn't have this issue, I will gladly upgrade.
#Shtong has answered below that I should use a dual monitor setup with different desktop configurations and install Visual Studio Productivity Power Tools. While this will technically fix the problem (I can now have two sets of mixed tabs and the sizes do not change) - the docking positions are forgotten instead. This means that if I dock the Solution Explorer to the right in design mode, then build, then go back to design mode -- my docked window is no longer docked.
I've also had this same problem in Visual Studio 2008.
Did you try installing the Visual Studio Productivity Power Tools that lets you split your editors into different windows, making two windows and attaching each to one monitor (instead of having one stretched over the two monitors) ? That way each window should fit into its monitor like every other window and your problem should disappear.

Resources