Search code examples
.netvisual-studiocode-contracts

How to (completely) uninstall Code Contracts Tool extension?


I'm trying to get rid of Code Contracts Tools extension on my system. I've uninstalled it from "programs and functionalities" yet it still appears as an installed extension inside Visual Studio.

Any help would be appreciated.


Solution

  • The uninstaller does not remove all files that are no longer needed. In particular, the actual VSIX files are never deleted:

    • codecontracts_project.png
    • codecontracts_SM.png
    • extension.vsixmanifest
    • license.rtf

    These files seem to be a source of trouble when upgrading the tools to a newer version.

    To completely uninstall the tools:

    1. Close all instances of Visual Studio to prevent file locks
    2. Remove the tools using the uninstaller listed under "Programs and Features"
    3. Delete the extension folder: <Visual Studio installation folder>\Common7\IDE\Extensions\Microsoft\CodeContracts