Visual Studio SP installation failed due to disk space problems, how to bring VS.NET alive again
This blog post will give you an indication in what kind of trouble you can get when the installation of a service pack fails. I must say it took me a while to get my original development environment up and running again. But the end results are that the IDE is up and running again. J
It all started when I installed the Visual Studio 2005 SP1 Beta and this is where the trouble started. The installation encountered an out of disk space error on a very crucial moment I guess. The installation fist took about half an hour before I got the message that I needed to uninstall the web application projects for ASP.NET. The installer asked me kindly if it should do the removal and so I let it do the removal.
After it removed the web application projects it again took a very long period and I got another message that it ran out of disk space. I know for sure I had more then 1 GB of free space before I applied the service pack, but somehow it must have managed to generate so much more data on disk that it ran out of disk space. The Dialog stated I should free up some space and click retry.
This is the message from the eventlog that is crucial and what helped me find a clue to fix my machine again:
Product: Microsoft Visual Studio 2005 Team Suite – ENU — Error 1307.There is not enough disk space to install this file: C:WINDOWSwinsxsx86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.363_x-ww_691a48fdmsvcp80.dll. Free some disk space and click Retry, or click Cancel to exit.
During the installation I noticed the message box with the same message as in the eventlog and I removed a VPC image of 8 GB and clicked retry. After only a few minutes now the installation totally broke down. I received an error message that the installer encountered and it gave the following message:
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2350
Wow, that is very helpful J
Now the installer started to rollback the things it had done, but this also resulted in several errors. The first one I got was:
Product: Microsoft Visual Studio 2005 Team Explorer – ENU — The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2908. The arguments are: {AF4DBA1F-73E8-499B-A445-B12D4881A8F1}, ,
And after this I received this message about a hundred times more with different GUIDS.
I already thought that I was in serious trouble now and after the installer got closed I tried to start visual studio again to check if it still worked. Well it did not and gave me a great error message
The application failed to initialize properly (0xc0000034). Click on OK to terminate the application.
Ok, now I officially knew that my development environment was toast and I knew I need to start fixing things. The first thing I tried is uninstalling visual studio 2005, but that did not work. Therefore I tried to repair my .NET 2.0 installation, but apparently the .NET framework was affected by the service pack installation as well. When I ran the repair of .NET 2.0 I got the error message :
Product: Microsoft .NET Framework 2.0 — Error 25007.Error occurred while initializing fusion. Setup could not load fusion with LoadLibraryShim(). Error: The handle is invalid.
This message told me something was terribly wrong with the fusion dll that is responsible for loading .NET assemblies. This could explain why all setups are failing, because I know the fusion.dll contains entry points to install assemblies in the GAC or remove them from the GAC. Therefore I took the tool Dependency Walker(http://www.dependencywalker.com/) to have a look at the fusion.dll that you can find in your framework directory.
The tool showed me that the fusion dll tried to load a library called MSVCR80.dll at the location C:WINDOWSWinSxSx86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.363_x-ww_691a48fd
The dll was missing and therefore broke the fusion dll!
As you can see from the previous error message I showed you you can tell this must be caused by the installation. It referred to exactly the dll as the one that failed to install when I ran into disk space troubles.
After searching for the files in my Visual Studio directory I found it in the redistributables folder for the CRT libraries. After copying the file back to the fore mentioned directory, I was able to repair run the.NET 2.0 installation again and repairing the framework setup.
After a reboot of my machine I was able to install Visual Studio 2005 again from the original installation media. Then after reinstall I got all kinds of package load failures. I got messages like:
VSIP: Package 'VsRptDesigner Package' has failed to load ( GUID = {97358C99-E52D-42C7-8B7C-B59CC4425F4B} ).
Please contact package vendor for assistance.
VSIP: Package 'Visual Studio Macros Package' has failed to load ( GUID = {A659F1B3-AD34-11D1-ABAD-0080C7B89C95} ).
Please contact package vendor for assistance.
VSIP: Package 'Visual C++ Language Manager Package' has failed to load ( GUID = {8C2EA640-ABC1-11D0-9D62-00C04FD9DFD9} ).
Please contact package vendor for assistance.
After calling the package vendor for assistance I decided I was on my own and needed to fix the problem myself J
To diagnose this problem further I started Visual Studio with the command line option /log. This will make the IDE log its activities in a file called ActivityLog.xml. After closing the IDE you can open the XML file and then it will show you highlighted what might have gone wrong in the IDE.
I saw entries marked like
LoadLibrary failed for package [Visual Studio Macros Package]
C:Program FilesMicrosoft Visual Studio 8Common7IDEvsmacros.dll
Since this error can be caused by the same problem I encountered previously I decided to load the DLL myself using the dependency walker tool again but now on the vsmacros.dll. And also this time I got the message that the dll could not be loaded, but this time because it could not find the dll MSVCP80.dll. I found that dll at the same location as the first one. I decided to copy over all dll’s from the redistributable folder and then loaded visual studio again.
Now that Finally gave the result I needed and the IDE runs Ok again!
I must say it was quite a journey to get this problem fixed. It took me many hours to find what was broken and causing the error messages. I hope this information can help you as well if you might run into troubles installing the service pack. One thing to keep in mind when applying the SP is to ensure you have lots of disk space available, so you don’t run into the exact same problems as I did. Chances are that the SP will work for you without any problem. It seems I ran into disk space problems on a very crucial part of the installation and that caused my troubles.
I think I will now first install the SP again on a Virtual Machine and have a look how well that will go. 🙂