CodeContracts.MSBuild icon indicating copy to clipboard operation
CodeContracts.MSBuild copied to clipboard

Visual Studio 2019 Support

Open IgorWolbers opened this issue 6 years ago • 3 comments

Do you have any plans to support Visual Studio 2019? VS2019 projects that reference the latest version of this NuGet package will not load, they produce an error in the Output window:

C:\solution-path\project-folder\project-name.csproj : error  : The imported project "C:\solution-path\packages\CodeContracts.MSBuild.1.12.0\Contracts\MsBuild\vCurrent\Microsoft.CodeContracts.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.  C:\solution-path\packages\CodeContracts.MSBuild.1.12.0\build\CodeContracts.MSBuild.targets

If there is a "quick" work around in the mean time I would appreciate that as well.

Thank you for making this package available, it has been very useful!

IgorWolbers avatar May 05 '19 12:05 IgorWolbers

A quick fix is to simply copy the "Contracts\MsBuild\v15" folder to "Contracts\MsBuild\vCurrent". This should fix the relevant problem.

Dronar avatar May 08 '19 12:05 Dronar

Yes, it will fix static checker problem, but Code Contracts are not supported since VS 2015

rudidlo avatar May 08 '19 12:05 rudidlo

Thanks @Dronar

erdouzun avatar Mar 19 '21 08:03 erdouzun