0 Comments

And also preserving the machine’s role in the company!


Recently I discovered that on my build server resides Visual Studio 2010 with SP1. It occupies tremendous amount of space and at the first glance it was totally unnecessary to be there at all. So I had this brilliant though and immediately went to Control Panel and hit Uninstall. Which of course failed miserably after 20 minutes of processing. Then destroyed the hard drive even more with finalization that rolled back the whole procedure…

It failed due to lack of the original .msi file, the Visual Studio 2010 Premium was installed from. Uninstaller asked me to point the location, but I am not in a possession of the DVD nor ISO anymore. Pity, because it could have saved me a lot of stress and time then. And yes, I had been warned (and even agree to take the risk) that it could leave the whole installation in an undefined state, where IDE won’t work and SP1 can’t be applied again.

My problem was not the IDE at all, but all the builds I failed to compile from now on. The message looked like this:

C:\TC.build\z-2022\Project.Dto\Project.Dto.csproj(222, 3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\Portable\v4.0\Microsoft.Portable.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

And fixing it started to be mission critical.


Fast forwarding to the day after.

Now, let me proudly present the solution:

  1. Download the Visual Studio 2010 uninstaller from here (cached also by me here).
  2. Open command prompt and type the command:
    ./VS2010_Uninstall-RTM.ENU.exe /full
  3. Hit enter and grab a coffee as it will take some time.
  4. Then download the Portable Library Tools from here.
  5. Type the command:
    ./PortableLibraryTools.exe /buildmachine
  6. Hit enter and wait few seconds to restore everything to normal.
    Without the switch it won’t install anything until it finds VS 2010 SP1 first!
  7. Optionally, if .NET Framework seems to be dead too it might be useful to also install .NET Framework Developer Pack 4.6.2.


All green again!

Post comment