System.diagnostics.contracts.contract exists as in version 4.0 v3.5

I just updated visual studio 2010 and installed msi code contracts. When I try to use it, I get a compiler error that the dll system.diagnostics.contracts.contract exists in both v3.5 and v4. Does anyone know what I have to do to solve this? Thank.

+3
source share
2 answers

If you are updating a .NET 3.5 project that uses contracts for .NET 4.0, be sure to remove the assembly reference Microsoft.Contracts.

Microsoft.Contracts .NET 2.0 3.5, .NET 4.0 mscorlib, . System.Diagnostics.Contracts, , , , .

+10

, , . , 4.5 .

0

Source: https://habr.com/ru/post/1759999/


All Articles