How to refresh template caches in VS 2010 - visual-studio-2010

I need to refresh the caches for item templates in visual studio to remove some deleted templates, and I have tried to run:
devenv.exe /installvstemplates
devenv.exe /setup
devenv /installvstemplates
devenv /setup
and all have failed to remove the deleted templates from the list.
Edit:
I just tried to change one of the stock templates, and refresh it with each of the above commands. It stayed the same in the list and worked just the same when I used it.
Edit:
Just like the idiot I am, I didn't use the Visual Studio Command Line, I used cmd.exe
Now it works fine, if a little slowly.

Related

How to fix context menu in Solution Explorer in VS 2022

After installing some extensions for SSIS and SSRS, the refresh option is showing up 4 times in the context menu. How do I remove them? This only shows up when right clicking a file.
Looked for appropriate settings in Tools/Customize/Commands/Context menu/. But couldn't find it.
You could try closing all instances of Visual Studio and then from the developer command prompt run
devenv /Setup
That will sometimes fix issues from extensions.
See the docs for devenv.exe (Visual Studio) command line switches at "Devenv command-line switches" and "Devenv command-line switches for VSPackage development".
A different step to try is to run the Visual Studio Installer and run a 'Repair'.

Visual Studio won't open

I just downloaded VisualSVN Server. It seems to have conflicted with Visual Studio, as none of my projects will now open. The error it is throwing up says
A problem has occurred when loading the Microsoft visual studio menu. To fix this problem, run 'devenv.exe/resetsettings from the command prompt.
I rebooted and am getting this error now:
The MRU package did not load correctly.
I tried "devenv.exe /setup" as commented, but it completely broke my VS2015.
Then I tried "devenv.exe /resetuserdata" and it works now.
The fix for me was to run visual studio using ./devenv.exe /setup using a console session running as Administrator. Running ./devenv.exe /resetsettings didn't fix the issue for me.
I had this issue and I didn't have Visual SVN installed. Resources online suggested that you should check the registry key HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0_Config\Packages\{2DC9DAA9-7F2D-11d2-9BFC-00C04F9901D1} and ensure InprocServer32 is correctly set to the vslog.dll file. If it isn't then it suggested running './devenv.exe /setup', however my machine had this correctly set, and running devenv with the setup flag fixed the issue for me.
I was getting this repeatedly in Visual Studio 2015 and it was driving me up the wall. The /resetsettings option worked, but of course deleted all of my customisations, which was very irritating.
The solution turned out to be a path that was too long. See:
http://andydunkel.net/coding/2015/11/13/visual_studio_problem_occured.html
My path wasn't 2048 characters but was close, so try removing some unneeded entries from your PATH and it might solve this problem.
I encountered the same issue with VisualSVN 4.0.12 installation in Visual Studio 2013. (Interestingly, my Visual Studio 2012 instance worked just fine, it was only VS 2013 that was affected.) To resolve the issue with VS 2013, I performed the following steps:
I unblocked the VisualSVN-4.0.12.msi file that was in my downloads directory.
I right-clicked and selected "Repair Installation" from the context menu.
I right-clicked my VS 2013 icon and selected "Run as Administrator".
VS 2013 started up normally, with no error messages.
I think the key was making sure the that the .msi file was unblocked before performing the installation.
devenv.exe /resetsettings
Did not work for me originally. Make sure you run the command prompt as administrator.
Open Visual Studio developer Command prompt in Admin mode.
Run devenv /resetsettings
It will reset you visual studio default settings(theme, layout) etc.
And not any of the project settings.
I had the Visual Studio 2019 installed and had the same issue, chkdsk command resolved it.
Run devenv /resetsettings not
i reset my computer and it is opened directly
Run devenv /resetsettings as Administrator did not work for me.
Running "devenv.exe /resetuserdata" works but you will have to do reconnect to your Azure/Teams which should be straight forward.

Lost formatting in Visual Studio

I've lost all the color formatting in the source view in Visual Studio and can't get it back. I tried to import a new scheme but nothing helps.
Anyone?
Had this a while ago, these steps fixed it for me.
close all running instances of Visual Studio
open a "Run" window and type in devenv /resetuserdata
edit
perhaps this might work for you, its for 2012 but it might work for 2013
Here is a simple solution. Go to the directory where devenv is (for 2012 RC), and type devenv.exe /setup. It will fix your problem.
devenv.exe is usually in something like C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE.
Edit: It has been suggested that you do this from the Visual Studio command prompt (Start>Microsoft Visual Studio>Tools>Visual Studio Command Prompt), and/or make sure your command prompt has administrator permissions.
How can I get user type C# syntax highlighting working again in VS 2012 RC?
This did the trick!
devnev.exe /ResetSettings
More details here
Lost formatting in Visual Studio

No templates available when creating a new project in Visual Studio

"No template information found. See the application log in Event Viewer for more details. To open Event Viewer, click Start, click Control Panel, double-click Administrative Tools, and then double-click Event Viewer."
That's the error message I get when I try to create a new project or solution.
How can this be resolved?
I used a solution presented to me from other sites. One of them said to reinstall templates.
I did the following:
In the command prompt I typed: cd C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE
Then I typed: devenv /installvstemplates
I took a minute but after it completed I opened Visual Studio and tried to create a new project. All my project templates were back in order, including additional templates like Workflow, SharePoint and Silverlight.
Link to other source
Start Menu --> Microsoft Visual Studio 2008 --> Visual Studio Tools. Right-click over the Visual Studio Command Prompt shortcut and make sure you select Run as Administrator. Once the VS Command Prompt comes up, execute the command without Quot,
"devenv /installvstemplates"
"devenv /resetsettings"
And that worked out.
Run Following command and it will restore templates.
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE>devenv /installvstemplates
This may not match the original posters exact symptoms but I was seeing a blank screen after clicking Create a new project (VS 2019). Discovered that the install of Visual Studio had 'finished with errors' (paraphrasing there - now I've fixed the issue I can't see the exact error message) anyhow digging into it I found that the C++ redistributable had not installed (even though I'm a C# dev that's still important to VS!)
If I tried to install this as a standalone I got an Access Denied error (even if running as Administrator). Digging into the VS install logs I found a similar report.
Anyhow after a fair amount of Googling a few responses pointed to Virus software preventing the C++ redistributable from installing (in my case McAfee). Once that was removed a repair of VS resolved the issue :)

Visual Studio 2005 Intellisense stopped working after ReSharper installation

I installed the ReSharper evaluation version and uninstalled it. Afterwards Visual Studio's Intellisense stopped working. I have restarted computer but I still have this problem.
Can anyone please help me here?
I am using Visual Studio 2005. Thanks.
Try opening Visual Studio Command Prompt and entering:
devenv.exe /ResetSettings
Try going to Tools > Options > Text Editor > C# and checking all of the options under Statement completion. I think Resharper disables these upon installation.
Sometimes deleting the ncb file helps. Go to your solution directory and find the sln file, there will also be a file with the same name and the extension ncb. Make sure Visual Studio is closed (at least don't have that project open) and then delete that file. Don't worry Visual Studio will rebuild it for you.
The devenv.exe /ResetSettings was the only thing that worked for me. The full path in command prompt is as follows (for VS 2008)
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE>devenv.exe /ResetSettings
took me a while to find so I thought I'd post this to help
devenv /ResetSettings worked after uninstalling ReSharper. I did not have to do a repair. I did verify that the settings were checked under Text Editor > C#, but ResetSettings was the only thing that worked.
You could try to reset your Visual Studio setting by
End Process devenv.exe from Tast Manager if it is running .(It can close your Browser and Visual Studio)
Run devenv /resetuserdata from Start -> Run
Hope It can help you.
Disable updating intelliSense like in this article:
http://amastaneh.blogspot.com/2007/11/disable-updating-intellisense.html
Eventhough for old version seems to work for me.
I would try a "repair" on the installation first. Control Panel, Add/Remove Programs, select Microsoft Visual Studio 2005, click "Change/Remove". It will load up the install dialog and give you the option to do a "repair".
YMMV, but at least it should reset a lot of the VS resources to their "fresh" state.

Resources