Code contracts cannot connect to the cache itself that it created

In a specific project that uses CC, in visual-studio-2013 Build error list window:

CodeContracts: Unable to connect to cache. Static CodeContracs code will not run

Google, I found here that it was possible to track cache connection attempts using the following additional static check option

-trace: cache

The CC output then became a bit more verbose:

  • CodeContracts: MyAssembly: [cache] Clousot version version: 1.7.10908.11
  • CodeContracts: MyAssembly: [cache] Slice Timestamp: 2014-09-25 10:55:50
  • CodeContracts: MyAssembly: [cache] Could not open cache: model compatibility cannot be verified because the database does not contain model metadata. Model compatibility can only be verified for databases created using First Code or First First Code.
  • CodeContracts: MyAssembly: time spent connecting to the cache server: 00: 00: 01.4948105
  • CodeContracts: MyAssembly: Diagnostic: Failed to connect to any cache.

So for some reason, this looks like an internal error inside the CC mechanism related to the way it stores analytic information in a cache that it creates internally (I do not specify any of my Sql servers for the cache).

I was able to figure out that the cache files are stored by default inside AppData / Local / CodeContracts. Unfortunately, even deleting the entire directory did not solve the problem.

Any ideas on what the next step should be?

+6
source share

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


All Articles