Why is the upgrade procedure cumbersome?
PostSharp 3.0.12 included NuGet 2.1 in its payload. Unfortunately, because of limitations of the Visual Studio Extension Installer (VsixInstaller), it was not possible to install PostSharp when NuGet 2.2 was already installed. We had other problems with the way that VsixInstaller handled dependencies (I’m quite confident to say that it is a broken feature), so we decided to handle dependencies manually, without relying on VsixInstaller.
Because of the dependency to NuGet, PostSharp needed to be installed for All Users, requiring elevation during installation. But since we don’t have the dependency to NuGet anymore, PostSharp does not need to be installed with elevated privileges anymore. This is one more situation that VsixInstaller does not handle properly.
What is the proper procedure?
Since Visual Studio Extension Installer is not able to upgrade PostSharp 3.0.12 to 3.0.13, you will have to uninstall PostSharp manually.
- Start Visual Studio with elevated privileges.
- Go to Tools / Extensions and Updates, click on PostSharp, then click Uninstall
- Install the new PostSharp
That’s it. Perhaps that was not so awful.
Remember that this procedure updates only the Visual Studio Extension for PostSharp. You can upgrade the compiler itself using NuGet.
Happy PostSharping!
-gael