Visual Studio crashing when trying to diff or compare files - visual-studio-2012

I'm using TFS for source control and the other day I undocked my laptop while running VS. I couldn't connect to the internet and then unfortunately there was an unexpected shutdown. Since then I have not been able to go into pending changes and compare the file to it's previous version. When I do, it crashes Visual Studio.
I can change the user tool in Options > Source Control > Visual Studio Team Foundation Server to use a third party diff checker and it works no problem. However, I've gotten used to Visual Studio's diff checker and would like to continue using it, if only because it doesn't open a separate window to diff in.
Since I'm not sure as to the source of the problem, my question is two-fold:
First, how do I fix Visual Studio's diff checker and stop it from crashing every time I try to compare with previous version.
Or, if the issue lies with TFS, why is it crashing and how do I fix it?

Click on Visual Studio Menu:
TOOLS > Options
Then on Left Panel:
Text Editor > HTML > Advanced
And finally on Right Panel:
Extension Management > Identify Helpful Extensions
Change this setting to false.
This is an old question, but I needed to fix this recently, so the bug still exists!

I solved this problem by going to Tools -> Options -> Source control -> Plug-in Selection and changing the plug-in to "Git"

Try to disable ability to Identify Helpful Extensions:
Go to Tools->Options->Text Editor->Html->Advanced->Extension Management->Identify Helpful Extensions and switch to false.
You can start VS in safe mode with "/SafeMode" param.

Related

When we compare local version with server version in Visual Studio, how to make the local version editable?

I found that sometimes when I use "compare" in Visual Studio, I couldn't edit the local version at all. But sometimes it does allow this. Is there any setting in TFS that is related to this functionality?
The steps I followed:
Right clicked the file in Solution Explorer I want to compare, and chose "Compare", with the dialog window popped out like this:
and cliked "OK"
I found several questions similar to my question, but amazingly all of them don't have even a relevant answer:
Visual Studio Diff Tool - When is Editing Allowed?
Under what conditions will the Visual Studio 2012 Difference Viewer allowing editing a source file

Visual Studios Menu not showing build button

Hi I'm trying to teach myself c++ but I can't even get the most important feature to work. The build/compile button won't show. Its grayed out. I only want to use visual studios because its what all the devs use in my friends company where I want to work. So, any way to get this thing working? This is Visual Studios 2013, I've tried the profile changing feature in attempt to fix it but it still shows up as grayed out and I can't use it. I have made no other changes since installing it.
Also to start my code I did file> new> file> C++ file
Thanks for any help.
Visual Studio relies on projects, so you need for your source file to be part of a project - this would also hold all the configuration for compilation and linker settings, analogous to a *nix style Makefile.
To create a new project, Do File > New > Project... And choose a suitable template from under the Visual C++ section. Typically, if you're just starting out, and only want to work with the console, then you'll probably want to choose "Win32 Console Application" as the project type.

Pressing Ctrl + S automatically opens Output window

Whenever i press Ctrl+S from keyboard or whenever i click on any file in Solution Explorer it automatically opens output window only in Visual Studio 2012.
I tried
Tools > Options > Projects and Solutions > Show output window when build starts
I am using Visual Studio Professional 2012
But its just not working. Its irritates a lot. Please suggest how to get rid of it.
if someone is facing this issue in visual studio community 2015, in my case the issue was caused because of the use of Backup and sync utility from google, I have synced my source directory to my google drive to maintain the latest copy of source backed up.
The backup utility locks the file which you might be editing for syncing it to cloud storage. since the file is locked by another process, the visual studio cannot save the changes in the file.
The fix was to pause the syncing for the time you are doing frequent changes.
In your case, it might be some other process which might be locking the file.
If you're using an extension, one of them could be the reason.
I had the same problem while saving the CMakeLists.txt files. I checked one of the extension's setting, "CMake Tools", it has a "Cmake: Reveal Log" settings which causing this problem. I simply deactivated it
I suggest you to check extensions' settings or try to find on settings with searching "output", "focus" etc.

How do I truly reset every setting in Visual Studio 2012?

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

Visual Studio 2012 + Resharper 7.1 = slooooow, what to do?

I used to have R# 6 with VS2010 and it was great.
Now I installed yesterday R# 7.1 trial and my VS 2012 became slow to the point I really
want to uninstall R# despite all the heartache involved with it.
Any advices on how to troubleshoot this performance issue?
Please be more specific: what kind of projects do you work with, did you notice which particular actions are slow (for example, opening a solution, invoking code completion (IntelliSense) in JavaScript or something like this). Without details I can only give you these general advises:
Close Visual Studio, try to delete your solution caches (they are usually located near your *.sln file, in folder named like _ReSharper.), open Visual Studio again.
Try to temporaty disable/uninstall all other Visual Studio extensions/plugins.
Try ReSharper 8.0 EAP, maybe your issue is fixed there.
ReSharper has a feature that allows you to profile it (menu ReSharper | Help | Profile Visual Studio). If you know a reproducible slow action, you can invoke this feature, make this action and then send this performance snapshot to JetBrains support (http://www.jetbrains.com/support/resharper/) or open a bugreport at http://youtrack.jetbrains.net/. They could tell you which part of ReSharper is slow and how to disable that part.

Resources