Visual Studio 2013 stops working after installation of Code Contracts - visual-studio-2013

I recently installed Visual Studio 2013 on my dev machine and was missing Code Contracts support afterwards (had it installed previously), so I reinstalled Code Contracts. Immediately thereafter, Visual Studio refused to start up with the error message "A problem occurred when loading the Microsoft Visual Menu....", as described here.
I tried to do as advised in the message in every possible way I can think of, but none of them worked.
So I reinstalled Visual Studio 2013 and got the following behaviour:
VS does launch up correctly for exactly one single time, right after the reinstall. Any subsequent lauch fails with the error message described above. I verified this by reinstalling VS a second time and got the same result.
I then uninstalled Code Contracts, reinstalled VS again and still got the same. After completely wiping my system of .net framework 4.5.1 and reinstalling VS again, I was finally rid of this message.
So I braced myself, launched up the Code Contracts installer and guess it? Same procedure as every year: One single correct VS launch, all subsequents with error, again!
I did the same setup on two other machines, neither of which had any problems.
What can I try next (short of wiping my whole machine)?

Related

After upgrading to Visual Studio 2019 16.7.1 the program hangs

I use Visual Studio Community 2019 with C++ (no .Net). Yesterday I updated to version 16.7.1. Ever since then, Visual Studio hangs on exit at the step "Unloading Projects". No projects are unloaded, and the progress bar never starts moving. The program simply hangs and is unresponsive. The only way out is to kill the process.
It also hangs whenever I try to change the Configuration target for the solution. Both issues occur on any of my solutions that I open. I have tried using Visual Studio Installer to repair the install, but it makes no difference. The installer does report one issue: Couldn't repair Microsoft.AspNetCore.TargetingPack.3.1.3.1.3 But this hardly seems like it matters to my Win32 projects.
This problem definitely started as soon as I updated to 16.7.1. I don't recall the previous version I had, but I had just updated a few days before so it was probably 16.7. I am posting to see if others have this problem and if anyone has found a solution (other than falling back a version). I will limp along with it for now.
Same happened to me. Just use visual studio 2017. Only thing that fixed it for me.

Cannot install any Visual Studio program

I have been trying to install Visual Studio for a couple of days now and none have operated. First I tried Visual Studio Community 2017 and the installer was installed and then the vs was installed but when I try and run it I got an error message that directed me to the ActivityLog file. I've tried uninstalling it then reinstalling it but that didn't work. I came across a solution that required me to try opening it using the Developer Command Prompt which I wanted to do but when I clicked on it from the Start menu it said that the link is missing. There was another Visual Studio program that had also installed and when I tried loading that one, it also directed me an ActivityLog file.
So I uninstalled the 2017 version and tried installing an earlier version hoping that it would work. I can reinstall for whomsoever would want to see the error message as well as the log file.
I then tried the 2013 version (since that is the one we use at school anyway). After downloading the file, I do not even get to an installation screen. A pop-up appears that says that the program requires the Microsoft .NET framework to work
Installation pop up window
The first time I tried it gave me options to accept and continue or cancel so I clicked on accept and continue and that was the end of it. Nothing happened after that. Now when I click on the installation file it just appears as in the picture above with no options. I tried to follow the instructions on Cannot install Visual Studio 2017 Community since that is the closet to my problem that I have found but it still didn't work.
Please help. I really need at least one Visual Basic to work.

Microsoft Visual Studio 2017 RC fails to load several packages after reinstalling

I had to reinstall Visual Studio 2017 RC because it wasn't getting the locale configurations right after switching non-Unicode program configurations. Also, I have a broken Visual Studio 2015 in my Windows 10 system: It can't uninstall, not even repair.
While reinstalling, I kept getting many install errors from very different packages (from Office365 to NuGet). After many tries, however, I managed to somehow install it without any errors.
But upon trying to open any solution or vcxproj project I am greeted with many different errors involving different packages not loading correctly, such as:
RestoreManagerPackage
VSPackage
Editor package
NuGet package
Funny enough, now VS2017 can't open any file that has been associated with it, opening a 'migration' page in my browser, and notifying that the filetype has been rejected.
I am well aware that errors like this are quite common upon installing the latest versions of Visual Studio (from 2012 to 2015), and the most fittable and common solution would be to remove the directory %localappdata%\Microsoft\VisualStudio\15.0_xxxxxx\ComponentModelCache.
But I'm posting this because the error recorded in ActivityLog.xml is something quite different, involving I/O errors and other processes using other files. Also, I've tested the former solution and hasn't worked at all.
I was thinking that the fact that VS2015 is still installed (and broken) might be affecting VS2017RC in some way.
Here's the ActivityLog.xml file
I found this very strange because this error happened after a fresh restart.
Also, I've tried to return to a restore point that was created shortly after the first install of VS2017 RC, but the errors persist.
Update: Reinstalling all VC++ Redistributables didn't work.

Visual Studio 2015 Extensions Manager Index was out of range error

Env: Visual Studio 2015 Community Edition on Windows 8
Trying to open Tools --> Extensions and Updates results in the following error in a message box:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Tried running as Admin, same result.
I've tried looking at the log but nothing mentions that error.
In the log there are 3 error entries related to extensions which could be related, they say the following:
Error loading extension: Could not find a part of the path 'C:\path\to\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\14.0\EXTENSIONS\ZW2UF5JV.JVN\extension.vsixmanifest'.
The other 2 are identical except the odd string at the end is HQ1Y5EQD.TMG and 3KWE1LJF.Z1W.
Interestingly, just before those errors in the log appear, there is a line for each saying the extension was loaded successfully but if I try to go to the path it's got listed, it doesn't exist.
I can't find any reference to those strings on my machine. I've also searched the registry but can't find any reference in there either.
I can get into the Extensions manager if I click on one of the update notifications but the original error message just displays in the main pane and I can't do anything else. I can get to the online window but as soon as I click an extension, I am prompted with the original message.
I haven't installed any extensions or VS updates for a while but my Web Compiler extension extension has stopped auto compiling JSX files which is why I started trying to look at the Extension manager. I'm guessing the issues are related.
I can still work, compiling can be done manually which is inconvenient but not the end of the world. My worry is some other extensions are also misbehaving and I just haven't noticed yet.
Don't really want to re-install VS as a) it took ages last time and b) it might not fix the issue. Is there any good advice on troubleshooting the error or anything else I can try before I re-install?
I refreshed the GitHub extension on VS 2015 and got this error. Deleting the two cache files:
extensions.en-US.cache
extensionSdks.en-US.cache
from the AppData\Local\Microsoft\VisualStudio\14.0\Extensions causes them to be rebuilt and eliminates the error.
No reinstall needed.
Problem got worse, I started getting the error message when starting Visual Studio and things like the package manager wouldn't load. Each restart seemed to yield a different combination of windows not loading, sometimes Solution Explorer, sometimes Team Explorer etc. Not good.
A repair to VS 2015 via the Control Panel took a while but didn't help, same problems.
I ended up completely uninstalling and trying to re-install. However the installer threw an index was out of range error but weirdly VS 2015 was now listed as an installed application again.
So I'm guessing the original uninstall left some problematic files lying around which messed up the next install. So I uninstalled again, renamed Microsoft Visual Studio 14.0 folder, cleared all files from AppData\Local\Microsoft\VisualStudio\14.0\Extensions and re-installed.
It installed and ran fine.
The problem I now had was that I couldn't find the SQL Server Object Explorer window anywhere. I tried repairing SQL Server Data Tools but still no luck. So I uninstalled SSDT and then re-installed. This seemed to fix it.
Now I realised I also couldn't connect to Azure through the Server Explorer window, the option was simply not appearing in the list like it used to. This time a repair to Azure Tools for Microsoft Visual Studio 2015 - v2.9 and a repair to Azure App Service Tools v2.9 - Visual Studio 2015 fixed that problem.
I confronted same issue and found this thread. I tried the above suggestions, but unfortunately, it went all unsuccessful. I even tried to uninstall/install with even worse result as Visual Studio became unable to start due to new "missing components" issue. Reinstallation was nothing better.
I finally came by a piece of magic. It was Visual Studio Uninstaller which although would remove all your installed extensions, it would perform a complete cleanup. It would save you from installing new Windows (at least it was my case.
Just go to releases and download the first zip file
This way you will be able to perform clean install of Visual Studio.

Package Manager Console Error

When I start visual studio express 2012 for web I get this error in the package manager console.
Cannot load Windows PowerShell snap-in Microsoft.PowerShell.Core because of the following
error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions
property for more information.
Loader Exceptions:
Exception of type 'System.OutOfMemoryException' was thrown.
I don't remember adding anything new to visual studio. I searched other related problems but they don't work for me.
I tried repairing visual studio. I also tried re-installing visual studio which temporarily removed the problem but it is back again.
Anyone has a solution?
I finally made it work. I suspected it is something from windows update that messed up with my VS since I didn't really add anything to VS. I am not sure which updates to remove so I just uninstalled all the windows update that starts in a certain date. Here are the actual steps that I did:
What I did is uninstalled visual studio 2012 express for web following this tutorial.
And then uninstalled windows updates starting from the date I believe the error started appearing.
After I used CCleaner to clean my registry. Had to run it 2 times to just to make sure it is clean. I'm not sure if this actually helps. I just heard from my friend that uninstalling applications sometime leaves registry keys behind.
Finally, I installed visual studio again. Package manager is back to normal.
Restarted my laptop and it is still working. So I guess it is solved.
I think System Restore would do solve this instead of doing all this steps. But system restore was not an option for .

Resources