3

I get following warning for almost all my projects in a solution:

Contract reference assembly for project 'X.X.X' not found. Select 'Build' or 'DoNotBuild' for Contract Reference in project settings.

Code contracts build reference assembly actions

But I am unable to find any hint of from where we can set this option in visual studio.

Any help on this much appreciated.

Thanks and Regards

Community
  • 1
  • 1
Nirman
  • 6,715
  • 19
  • 72
  • 139

1 Answers1

7

Right click on project, Properties and on the Code Contracts tab You will find this option:

enter image description here

Istvan Reiter
  • 303
  • 4
  • 6
  • I dont see "Code Contracts" tab there.. There is only Code Analysis tab as a last tab – Nirman Jul 03 '14 at 10:33
  • 1
    I assuming that you have installed the latest CC. This is a common problem, looks like your installation somewhat corrupted. Try make a Visual Studio Repair install, that may get back the cc tab. Before that you can try uninstall/reinstall CC and reboot the OS, sometimes that is enough. – Istvan Reiter Jul 03 '14 at 10:50