My installation of VS 2010 does not appear to be saving settings in the Environment section (Recent files, show status bar checkbox, etc). Other settings do save properly, though (Auto Recover, etc).
Any ideas?
My Environment:
Windows XP
Visual Studio 2010 Ultimate, Team Explorer, TFS2010 Power Tools
Visual Studio 2008 and 2005 installed as well
Works on my XP laptop. The one difference between the two that I can think of is that I added the VS Theme extension on the workstation that I am having an issue on. Don't know if that fouled anything up in the registry.
When I modify the settings (like the number of items shown in Window menu input), the settings are not saved to the registry (HKEY_CURRENT_USER/SOFTWARE/Microsoft/VisualStudio/10.0/General/WindowMenuItemCount)
The fact that it's not saved to the registry would seem to indicate a larger problem than just VS. I would recommend using a tool like Process Monitor to see if it's attempting to write to the registry. Add a filter for devenv.exe and search for the registry key you're looking for. In this case, immediately after clicking okay after you set the number of "Recent Files - items shown in Window menu" in Tools->Options->Environment->General, you should see a write (Success) in the registry under that key (WindowMenuItemCount).
Related
Is there anyone who is using Visual studio 2019 in dark mode with High contrast?
If yes, can you tell me exactly how to do that?
As far as I know, Visual studio doesn't have an option to use High contrast for dark mode (it's there only for blue theme which I don't want).
And also if I change my Windows OS to use high contrast mode and come back to Visual studio, and then by default VS adjusts itself to high contrast but it's very poor to read (it reads like plain white text on a black blackground devoid of any other colors)
I was wondering if there's something in VS 2019 which is similar to Visual studio code high contrast mode or maybe IntelliJ Idea which is very user friendly and serves the purpose.
Thanks in advance.
You can enable dark mode in the VS2019 by modifying a private registry in a next way:
Close all instances of VS2019
Press Ctrl+R and run regedit
Expand HKEY_USERS elements in the tree
File -> Load Hive...
In the dialog navigate to C:\Users\<UserName>\AppData\Local\Microsoft\VisualStudio\16.0_XXXXXXXX and load privateregistry.bin file. It will ask you to give some name, for example, "vs2019". (it might be useful to store somewhere a copy of privateregistry.bin file for backup)
Export te “Dark” theme registry key: HKEY_USERS\vs2019\Software\Microsoft\VisualStudio\16.0_????????_Config\Themes\{1ded0138-47ce-435e-84ef-9ec1f439b749}
Replace the GUID of the “Dark” theme ({1ded0138-47ce-435e-84ef-9ec1f439b749}) with the GUID of the “High Contrast” theme ({a5c004b4-2d4b-494e-bf01-45fc492522c7})
Import the reg file
Important: Click on vs2019 -> File -> Unload Hive...
Note, it might happen after Windows or VS updates, your setting will be erased. In this case, you need only to load hive, import modified file from step 7, and don't forget to unload hive.
Inspired by this post: Visual studio 2017 high contrast theme dark registry hack
Visual Studio likes resetting this pretty often so I made a cmd script that lets you select what theme to override 'High Contrast' with instead of doing all of those steps manually each time.
Get the script here.
The most clean way is to modify the current used theme as this is the behaviour Visual Studio executes when changing themes in the settings.
Close all instances of Visual Studio 2019 / 2022
Press Ctlr+R and run regedit
In the node tree, expand HKEY_USERS
Press File -> Load Hive...
In the dialog navigate to C:\Users\<UserName>\AppData\Local\Microsoft\VisualStudio\16.0_XXXXXXXX or if you use Visual Studio 2022 C:\Users\<UserName>\AppData\Local\Microsoft\VisualStudio\17.0_XXXXXXXX and load the privateregistry.bin file. It will ask you to give some name, for example, "vs2019". (before proceeding a backup of the privateregistry.bin file is advised)
Navigate to HKEY_USERS\vs20xx\Software\Microsoft\VisualStudio\1x.0_xxxxxxxx\ApplicationPrivateSettings\Microsoft\VisualStudio
There, set the value of ColorTheme and ColorThemeNew to 0*System.String*1ded0138-47ce-435e-84ef-9ec1f439b749 and 0*System.String*{1ded0138-47ce-435e-84ef-9ec1f439b749} respectively. If you wish any other color please check HKEY_USERS\vs20xx\Software\Microsoft\VisualStudio\1x.0_????????_Config\Themes\ for the theme IDs.
Click on the loaded node in the node tree named vs20xx and then File -> Unload Hive...
This will change the setting in Visual Studio to use a different theme instead of changing the themes themselves and will most likely be persistent after updates.
Say I have one instance of Visual Studio running where I have opened few windows like Unit Test Explorer, Resharper TODO explorer and so on and to take advantage of multiple monitors I have moved these windows out of visual studio to different monitors.
Now if I open different solutions in new instances of Visual studio (say from Visual Studio > Recent items jump lists) all the new instances also open with similar windows in each instance, even though I don't really need those in those new instances. These clutter my work space and I have hunt and close these one by one.
This continues until I close all the news Visual studio instances, close all the windows on the first one instance I had and close that instance as well.
I understand this behavior stems from the fact that the new instances inherit the opened windows etc. configuration from the first opened instance.
Is there any way to prevent the same windows from opening on subsequent instances of visual studio?
Or may be a configuration to launch visual studio with default windows?
Or quick way to kill all these unwanted windows?
I looked through the VS > Options > Environment > Startup and Tabs and Windows etc., devenv.exe command lines but don't find anything useful.
While the solution provided by #Richard to establish your "baseline" window layout, then save that (Window | Save Window Layout) and apply the layout using Window | Apply Windows Layout | name or the assigned shortcut helped as a workaround, I see Microsoft Visual Studio 2019 now comes with a preview feature, Autohide tool windows at startup,
that addresses this problem.
When enabled, any new instances of Visual Studio open only Solution Explorer and not any other windows opened on previous instances. This also improves startup performance noticeably.
In Windows Explorer when I double-click on any Visual Studio file (*.cs, *.csproj, etc.), it's opening an old version of VS instead of the latest one (VS 2017). And VS has associations with too many file types.
How can I change the default Visual Studio (for all those files that VS can handle)?
There is a similar old question about Visual Studio 2008 (Move file associations from Visual Studio 2005 to 2008) but the solution in there doesn't work anymore (there is no "Restore File Associations" button on the settings of Visual Studio 2017).
Each version of Visual Studio registers itself in the Set Default Programs panel of the Control Panel.
Go to Control Panel\Programs\Default Programs
Then choose Set Default Programs:
In there you can simply choose the Visual studio version of your choice and then click the button Set this program as default in order to associate every file type that VS handles.
Or you might prefer to click the button Choose defaults for this program to review the current associations of those file types and change only the ones you want.
Yet another in a long list of previously working-just-fine things which Microsoft have managed totally #$#%# up. If I try to change defaults the 'right' way I get this kind of thing:
i.e. completely ignored. The only way I've managed to solve it is by removing the file association entirely through the registry. Let's take .asm as an example:
Open Registry Editor / "regedit.exe"
Navigate to HKEY_CLASSES_ROOT\.asm\OpenWithProgIds
Delete any Visual Studio values you see
From there, you can (finally) open files with whatever you choose instead of having the association clamped to Visual Studio:
For the record, I believe this to be a problem with Windows 10. Not with Visual Studio. See: https://answers.microsoft.com/en-us/windows/forum/windows_10-files/cant-change-default-programs-in-windows-10/229fc3a9-25c9-433b-a333-5806bc5090db
On the file you will always open with vs17, click right and choose open with and there choose another app. On win10 it pop out a dialog with some proposals. If vs17 is there, choose your favorite and activate the always open with. then ok and your done.
Please tell me how to fully remove Visual Studio with all components and also remove registry(Any batch file or any Command which runs from Command prompt)
Go to Programs and Features (in Control Panel)
click on 'Microsoft Visual Studio {your distribution e.g. Pro/Ent etc} 20XX'
click on Change
click Uninstall
Do the same for all other existing Microsoft Visual Studio components in that list.
EDIT:
based on your comment below, I'd suggest you to use Windows 7 Manager or Windows 10 Manager based on your OS, its quite handy and fast, it even cleans registry as well. I've personally had good experience with it.
Picture says it all, it should currently be showing a file but as you can see its having issues drawing the content of the file.
I have unloaded all addons and restart visual studio.
If it mathers the previus project was a VS 2k8.
New Info:
If i wait a good 5min ( I have a Quad core I7 with 6gb ram, 295gtx. VS is running from a SSD).
It will load the text, but im unable to "edit", as it will have loaded some document (.cs ) but when i select the one i want to edit it not realy open that file.
It can best be described as visual studio having a 5min lag.
I had this precise bug. I would open files from the solution explorer but the editor window would either not appear, only 1-2 lines of 100+ line files would display, or the file would display but I could not scroll or otherwise edit the file. Some parts of VS were working, i.e. little tooltips would appear if I moused over the right part of the (invisible) text but I obviously couldn't do much in this state.
I have a lot of VS stuff installed so I thought it was some sort of plugin or extension that was causing things to go screwy. These installed items include:
Visual Studio 2010 10.0.30319.1
ReSharper 5.1.3000.12 (JetBrains)
DevExpress DXCore 10.1.5 (free community edition)
DX Source Outliner (reason for DXCore, from sbohlen)
Tabs Studio 2.0.6 (www.tabsstudio.com)
Productivity Power Tools 10.0.11019.3 (Microsoft)
Snippet Designer 1.3.0 (Matt Manela)
I solved it (2/18/2011) by Tools... Extension Manager... disabling the Productivity Power Tools and Snippet Designer. No idea what was going on but this fixed it for me and I was back to work. Probably something in the system drawing and/or display options.
EDIT
The issue continues. Unfortunately it is intermittent and I have not be able to reproduce it reliably. Now the suspects are the BugShooting and CaptureWiz screen capture tools. I've had the behavior show up and then disappear in and around the time of logging bugs with them.
2nd EDIT
The issue continually continues. I have not yet been able to determine the cause but usually quitting VS and restarting resolves the issue(s). Other parts of the behavior includes the menu options (File, Edit, View, etc.) not operating properly as they show only the highlight but not the actual menu items. The solution will build and run just fine, but things still won't show up properly.
I had a similar issue whereby VS2012 was telling me that I had active (open) files, but the text editor was not displaying them. Clicking on the file(s) in the solution explorer seemingly did nothing. Alt + Tab just cycled through the open files, but still, nothing rendered on screen.
I solved it by clicking on the "WINDOW" menu item and then"Close All Documents". Visual Studio then behaved as expected and opened (and rendered) the files correctly.
This bug was created by mumble 1.2.x, but is fixed in the snapshot versions of 1.3.x. YOu can likely get simular bugs by other software that does DirectX overlay.
I had the same issue in Visual Studio 2012. It was fixed by running a repair of Visual Studio 2012 via Add/ Remove Programs.
The following had no effect:
Closing and reopening a solution
Opening different file types
Restarting Visual Studio
Adding and removing plugins
Resetting options via the 'Reset all Settings' option in Visual Studio's 'Import and Export Settings'
Rebooting windows
I had this problem in Visual Studio 2013. Problem was: extension "Regex Tester". I had to uninstall this extension.