Code Contracts requires .NET 3.5 to be installed? RRS feed

  • Question

  • I have this error:

    C:\Program Files (x86)\Microsoft\Contracts\MsBuild\v4.0\Microsoft.CodeContractAnalysis.targets(238,5): error MSB4062: The "Microsoft.Research.CodeContractsAnalysis" task could not be loaded from the assembly C:\Program Files (x86)\Microsoft\Contracts\Bin\MsBuildCodeContracts.dll. Could not load file or assembly 'Microsoft.Build.Utilities.v3.5, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

    Thursday, December 11, 2014 5:27 AM

All replies

  • Any chance you solved this?


    Thursday, April 28, 2016 3:54 PM
  • I started getting this error this morning after I woke up to a Windows update (Win10 Anniversary Update). I was literally running unit tests on this solution at 4am, and at 8:30, my PC looked completely reset, and no project in the solution will now build. I've even installed the absolutely latest version of Code Contracts, but it's not working. I'm guessing the Anniversary update removed old versions of .Net, but I haven't dug around enough to know for sure.

    EDIT: Appears that the Anniversary Edition is silently disabling .Net 3.5. http://www.theregister.co.uk/2016/09/28/sage_avoid_windows_10_anniversary_update/

    I REALLY wish MS would get its act back together, and soon. Win10 has brought on a really careless MS, where they push out garbage and only fix it when it screws over a bunch of users. Guess the dogfood days are over, and now we're expected to eat dog...food(I have another term for this stuff) and call it a sandwich.

    • Edited by RKPatrick Saturday, October 1, 2016 11:54 PM
    Friday, September 30, 2016 2:17 PM