On a specific project that uses CC, the following message is displayed in visual-studio-2013's Error List window upon build:
CodeContracts: Cannot connect to the cache. The CodeContracs static check will not run
Googling around, I've found out here that it was possible to trace attempts to connect to a cache using the following extra static checker option:
-trace:cache
The CC output then became a bit more verbose:
- CodeContracts: MyAssembly: [cache] Clousot version string: 1.7.10908.11
- CodeContracts: MyAssembly: [cache] Slice time stamp : 2014-09-25 10:55:50
- CodeContracts: MyAssembly: [cache] Cannot open cache: Model compatibility cannot be checked because the database does not contain model metadata. Model compatibility can only be checked for databases created using Code First or Code First Migrations.
- CodeContracts: MyAssembly: Time spent trying to connect to the cache server: 00:00:01.4948105
- CodeContracts: MyAssembly: Diagnostic: Failed to connect to any cache.
So somehow this seems like an internal bug inside the CC engine related to the way it stores analysis info into the cache it creates internally (I do not specify any Sql server of mine for cache).
I managed to find out that the default cache files are stored inside AppData/Local/CodeContracts. Unfortunately, even deleting the whole directory didn't solve the problem.
Any ideas on what the next step should be?