Reputation: 31
I have a very annoying problem. I have installed Visual Studio 2015 Enterprise with Update 3. One important thing to notice, I guess, is that it is not installed on C:\Program Files..., but on D:\Program Files...
I have installed the latest Code Contracts from the Visual Studio Gallery, which is "1.9.10714.2". Still, every time I open Visual Studio, I am seeing a notification that it want's me to update it, since according to it, the version I have installed is "1.8.10107.10". When I click it, it takes me to the same installation file, which says that I have installed that version already and asks me if I want to repair it.
I tried repairing. It didn't help.
I tried uninstalling, deleting folders (Common7\IDE...). It didn't help.
I tried uninstalling visual studio. It didn't help.
Finally I have REINSTALLED windows, along with everything and I still have the same issue.
NOTHING helped.
Please help me!
Upvotes: 1
Views: 139
Reputation: 3331
As per my answer here, I have installed CodeContracts v.1.10.10126.2-rc1 and it is working (and stable) with Visual Studio 2015.
This version of CodeContracts is the first major community-driven release of the DotNet CodeContracts, and resolves the problem you describe (and many other issues too!)
NuGet package is located here: https://www.nuget.org/packages/DotNet.Contracts/1.10.10126.4
Upvotes: 0
Reputation: 21
As Panagiotis stated: there is known bug with CodeContracts in VS 2015, that appears is still unfixed. You have to open the extension's manifests and manually change the wrong versions with the correct ones. The extension's manifest files are located in \Microsoft Visual Studio XX.X\Common7\IDE\Extensions\Microsoft\CodeContracts\1.9.10714.2 where XX.X is VS version. On my machine (VS 2015 + SQL 2014 + SSDT) there were 11.0, 12.0 and 14.0 folders and there were manifests in each one of them. Only one of them was wrong, so I fixed just one file. You can open the manifests with Notepad or any other XML editor, they are XML files.
Correct manifest looks like this:
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Version="1.9.10714.2" Id="CodeContractsVSIX.MicrosoftResearch.990ACB05-1AAE-4fa6-A178-9BF28206012F" Language="en" Publisher="Microsoft Research" />
<DisplayName>Code Contracts Tools</DisplayName>
[...]
</Metadata>
[...]
</PackageManifest>
Upvotes: 1