Is there a way to hide the classes-inside-a-file in solution explorer?
It adds to the "noise" there. The drop-down triangles are quite confusing - I want to immediately see what files are hidden (in solution explorer).
Instructions for Visual Studio 2017:
Close Visual Studio 2017
Open Registry Editor (regedit), select HKEY_USERS
File → Load Hive → %localappdata%\Microsoft\VisualStudio\15.0_<id>\privateregistry.bin where <id> is some hexadecimal gibberish. Set Key Name to the one you like e.g. vs2017
Go to HKEY_USERS\vs2017\Software\Microsoft\VisualStudio\15.0_<id>
Create new key UseSolutionNavigatorGraphProvider of DWORD (32-bit) type, value 0
Select HKEY_USERS\vs2017, File → Unload Hive
For VS2017 use Disable Solution Explorer's Dynamic Nodes extension github
or in VS Command prompt:
vsregedit set "%VSINSTALLDIR%/" HKCU "" UseSolutionNavigatorGraphProvider dword 0
Use registry editor to set UseSolutionNavigatorGraphProvider value in HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0 to 0. Or save the following lines into a file called "patchsolutionexplorer.reg" or something like this and import it into the registry:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0]
"UseSolutionNavigatorGraphProvider"=dword:00000000
For VS2019 it's the same registry hack
Computer\HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\16.0_<id>
Add new DWORD UseSolutionNavigatorGraphProvider set to 0
info from this link
Still some people never use the Solution Explorer to navigate the code
symbols and methods. In this case expansion arrows on code files only
create distraction in the Solution Explorer window. There is no option
to control the availability of file expansion, but there is the
UseSolutionNavigatorGraphProvider dword registry value (discovered by
Julien Lebosquain) that you can set to 0 to disable class view in
Solution Explorer. The registry key for this value is
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0 for Visual
Studio 2012 and HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0
for Visual Studio 2013 correspondingly:
it's makes sense for you?
In VS2017 (and pretty sure in VS2015 also), click on the little triangle to the right of the search box in Solution Explorer. In the window that pops up, uncheck 'Search within file contents'. That will only show files in the filtered results.
Bit late into the game.
This extension hides dynamic nodes.
Disable Solution Explorer's Dynamic Nodes
If you install the extension VSCommands, you have a setting to disable this.
http://vscommands.squaredinfinity.com/
Go to Tools -> Options -> VSCommands 12 and press the "Open Configuration" button.
Now the configuration screen of VSCommands will open. Go to "Solution Explorer" under "IDE Enhancements". Now check the checkbox "Disable Graph provider" and restart Visual Studio.
Now the classes inside a file should not be visible anymore in the Solution Explorer.
Related
I am trying to reset every single setting inside Visual Studio as I have completely lost all IntelliSense. I tried the Tools -> Import/Export settings -> Reset, but that is not clearing all the settings. I know it is not since the color theme was not reset, and I still do not have IntelliSense. Short of uninstalling and deleting every trace of the program including the registry, is there another way to reset every single setting to the factory default?
Visual Studio has multiple flags to reset various settings:
/ResetUserData - (AFAICT) Removes all user settings and makes you set them again. This will get you the initial prompt for settings again, clear your recent project history, etc.
/ResetSettings - Restores the IDE's default settings, optionally resets to the specified VSSettings file.
/ResetSkipPkgs - Clears all SkipLoading tags added to VSPackages.
/ResetAddin - Removes commands and command UI associated with the specified Add-in.
The last three show up when running devenv.exe /?. The first one seems to be undocumented/unsupported/the big hammer. From here:
Disclaimer: you will lose all your environment settings and customizations if you use this switch. It is for this reason that this switch is not officially supported and Microsoft does not advertise this switch to the public (you won't see this switch if you type devenv.exe /? in the command prompt). You should only use this switch as the last resort if you are experiencing an environment problem, and make sure you back up your environment settings by exporting them before using this switch.
How to hard reset Visual Studio instance
When developing extensions sometimes you just mess up, others someone else does. If you start getting errors loading even the most mundane extensions, these are the instructions to hard reset your instance.
Close Visual Studio (if you haven’t already).
Open the registry editor (regedit.exe)
Delete the HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\{version}
Delete the HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\{version}_Config
Delete the %LOCALAPPDATA%\Microsoft\VisualStudio\{version} directory.
Enjoy your brand new Visual Studio instance.
Use {version}=10.0 for Visual Studio 2010
Use {version}=11.0 for Visual Studio 2012
Use {version}=12.0 for Visual Studio 2013
If on the other side you want to reset the experimental hive you can do the same to with the ‘{version}Exp’ ones.
Happy coding!
Source: http://www.corvalius.com/site/hacks/how-to-hard-reset-visual-studio-instance/
Click on Tools menu > Import and Export Settings > Reset all settings > Next > "No, just reset settings, overwriting all current settings" > Next > Finish.
To reset your settings
On the Tools menu, click Import and Export Settings.
On the Welcome to the Import and Export Settings Wizard page, click Reset all settings and then click Next.
If you want to delete your current settings combination, choose No, just reset settings, overwriting all current settings, and then click Next. Select the programming language(s) you want to reset the setting for.
Click Finish.
The Reset Complete page alerts you to any problems encountered during the reset.
Executing the command: Devenv.exe /ResetSettings like :
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE>devenv.exe /ResetSettings , resolved my issue :D
For more: https://msdn.microsoft.com/en-us/library/ms241273.aspx
Just repair Visual Studio itself from the control panel and that should do the trick!
1) Run Visual Studio Installer
2) Click More on your Installed version and select Repair
3) Restart
Worked on Visual Studio 2017 Community
I have an ASP.NET MVC4 application solution (.sln). When I close Visual Studio and then reopen it and my solution, my tabs and my navigation structure in the solution explorer do not restore to the way they were.
The solution is big and it takes me a long time to reopen many tabs and open lots of folders in the solution explorer.
Is there an option in VS that would allow me to restore the solution to where it was when I left it?
I've already done "Reset all settings" in the Import and Export Settings Wizard, but it didn't help.
I've also tried booting VS in /SafeMode which disables any extensions. No difference.
Searching around I can't see anyone have similar issues.
As far as I know the .suo-File saves which files are opened. Try to delete this file (VS will generate it new) and make sure that windows-file-permissions are set correct (read, write access).
I had the same problem with Visual Studio 2013, and I solved it by doing this:
Export my current settings, making sure to UNMARK General Settings > Window Layouts.
Re-import the settings I just exported, but making sure I left General Settings > Window Layouts MARKED now (so it would overwrite the current Window Layouts with the "clean slate" of the imported settings.
Perhaps you can try the Workspace Reloader plugin that Scott Hanselman blogged about?
http://www.hanselman.com/blog/IntroducingWorkspaceReloaderAVisualStudioAddInToSaveYourOpenFilesAcrossProjectReloads.aspx
You can install it from here - http://visualstudiogallery.msdn.microsoft.com/6705affd-ca37-4445-9693-f3d680c92f38
Got this issue also for Microsoft Visual Studio 2022 Community Edition.
How to fix :
First, be sure, that tools->Project and solutions->General:'Reopen documents on solution load' and 'Restore Solution Explorer project hierarchy state on solution load' enabled
Second, just close VS and delete .vs folder, then re-start VS.
Works fine for me
With Resharper generate option (Alt+Insert), you can create a new folder from the solution explorer in Visual Studio.
I always used this feature for some years.
I click on an existing folder or at the root of a project and press 'Alt+Insert' and the last option is 'New Folder'.
Today, one of my co-worker who have seen this feature on my computer just tried to reproduce the behavior on his computer but without success; the 'New folder' option is not visible.
Is there any option in Resharper to be able to see this option in the generate popup?
Most likely keyboard shortcut got messed up. Go to Tools -> Options -> Environment -> Keyboard.
Search for Resharper_Generate command and assign your preferred shortcut key (alt + insert). That should do the trick.
The "New Folder" option only appears when the focus is on a folder or a project. If you display the menu on a file, it doesn't appear.
When I click on a reference, the word is not highlighted anymore.
In addition I can't navigate using CTRL-SHIFT-Down, or CTRL+Click.
It actually happens only one one file in my solution!
Does anyone faced this issue?
Context
Visual studio 2012
Tried
Restart VS several times
gleng's last comment Resharper > Options > Environment > Keyboard & Menus > Select Visual Studio and Apply Scheme should work.
If it still doesn't work, Go to the following folder and delete the Resharper's cache for the project.
%LOCALAPPDATA%\JetBrains\ReSharper\
For example,
%LOCALAPPDATA%\JetBrains\ReSharper\v8.0\SolutionCaches
I've had this happen a couple times and was able to solve by doing this:
Resharper -> Options -> Environment -> General -> Clear Caches
And/or:
Resharper -> Options -> Environment -> Keyboard & Menus -> Reapply
Visual Studio Theme
Fimally found the solution, right click => Properties on the file on the Solution explorer, for me the build action was set to None. Using Compile make it working as expected.
Thank your for your help everyone!
I'm attempting to use the Ctrl+R, Ctrl+R command within Visual Studio 2008 to rename a variable. I get an error message at the bottom saying that
"The key combination (Ctrl+R, Ctrl+R) is bound to command (&Rename...) which is not currently available."
I am not running it or anything I can think of which might prohibit modifications of the file and the F2 command allows a rename to happen. Anyone know how to fix this?
EDIT: I do have Resharper installed but was previously able to do this with the same setup, I recently migrated computers.
I was able to fix this by doing the following:
Go to Resharper → Options menu commmand
Select Environment → Keyboard & Menus
Select the Visual Studio option under Keyboard Shortcuts
Click Apply Scheme and Save
This will cause Ctrl+R, Ctrl+R to do a rename. (Select ReSharper options in the dialog box that pops up then.)
However, it made F2 no longer able to preform a rename. I was able to fix that by doing the following:
Go to ReSharper → Options menu command
Select Environment → General
Select the ReSharper 2.x or IntelliJ IDEA under Restore ReSharper keyboard shortcuts
Click Apply or OK
This allows both F2 and Ctrl+R, Ctrl+R commands to work for renaming a variable.
This seems to be specific to ReSharper being installed with Visual Studio, I don't know what the solution would be to fix this if ReSharper weren't installed.
For Resharper 6
You should:
Select menu "Resharper" - "Options..."
Select "Visual Studio Integration"
Choose "Visual Studio" in both places
Click "Apply Scheme"
It will either works or you will have a selection to do (Visual Studio or Resharper), if it is so, then choose Resharper.
resharper has multiple default shortcut bindings that is chosen the first time you start visual studio after instalation. My guess is you picked a different one this time.
In my case the problem was solved by clearing the ReSharper cache. This can be done in the options menu under Environment > General here:
This happened to me once. I had to reinstall Resharper (repair from Add/Remove programs probably) to get it to work. But that was with VS2005 though.
Using version 8 of ReSharper in Visual Studio 2013, I had to
Go to the RESHARPER menu -> Options
Expand Environment
Select Keyboard & Menus
Choose Visual Studio as the ReSharper keyboard scheme
Click Apply Scheme...Save & close dialog box.
The next time I executed a keyboard shortcut it prompted me to choose which keyboard shortcut I wanted to use.
Nothing has worked for me until I have tried upgrading my Resharper! :O
I'm guessing very few people will be in my situation but FWIW I was in this situation too where Refactor.Rename (Ctrl+R,Ctrl+R) was NOT working in Visual Studio 2019/Win 10, after reboots/restarts plus I did not have Resharper installed. In my case Refactor.Rename wasn't working because my project was in FOLDER mode not SOLUTION mode (OMFG). Soon as I used the solution tool to "Switch Views" and went into SOLUTION mode Refactor.Rename started working again. In hindsight this makes sense of course but some kind of error message/warning would have been nice to help me realize what the issue was!
For me, the issue was I hadn't started the Resharper evaluation which wasn't obvious because all of the Resharper extension options were accessible, but the clue was under:
Extensions -> Resharper -> Why Resharper Is Disabled.
Click "Start Evaluation" (in the same location as "Pause Evaluation" in the screenprint)
I expected the evaluation to start when I clicked "OK", but clearly it doesn't.
You get this behaviour in Visual Studio (without R# installed) if the editor window does not have focus when you issue the shortcut. I've just tried it with R# installed and it does the same thing.
Give the editor focus (ie. by clicking in it) and try again.
This is usually the shortcut used by Resharper. Is there any chance Resharper is not running?
Alternatively, you can change the name, hit Ctrl+. and then use Rename.
For DevExpress:
Open the Options screen (Ctrl+Alt+Shift+O)
Go to Core → Features
Set Default to Visual Studio shortcuts
For me, this problem was caused by me not clicking 'Accept" on the terms and conditions page, but closing it. I did not realize it was the terms and conditions, and thought it was just a notice, or a 'readme' being displayed.
All the answers above are well and good but this error also comes up in one more instance.
You start debugging your test script written for the project , the project stops at breakpoint .
If at this point , you try any operation on code , you will get the error similar to :
"The key combination (Ctrl+R, Ctrl+R) is bound to command (&Rename...) which is not currently available."
Restart Visual Studio.
Worked for me.
None of the above worked for me. I had to reset my resharper settings in the end.
Go to Resharper -> Manage Options
Click the "Reset All Settings" button
In my case (Visual Studio 2022 17.4.0 with Resharper 2022.2.2), I had to
disable Resharper
restart Visual Studio to make the change effective
enable Resharper
restart Visual Studio to make the change effective