Fresh install of VS2012 and Code Contracts, static analysis fails with SqlServerCe 3.5.1.0 not found
-
Tuesday, November 27, 2012 9:36 PM
Hi,
I've got VS2012 Premium, and the most recent version of Code Contracts (1.4.51019.0) installed. I create a very simple windows store class library and a test library. Turn on static analysis. When I hit build I get the following crash:
1> CodeContracts: Task manager is unavailable (unable to run in background). 1> CodeContracts: ContractsStoreLibrary: Run static contract analysis. 1> CodeContracts: ContractsStoreLibrary: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified. 1> CodeContracts: ContractsStoreLibrary: at Microsoft.Research.CodeAnalysis.EntityCacheDataAccessor`5.GetMetadataOrNull(String key, Boolean silent) 1> CodeContracts: ContractsStoreLibrary: at Microsoft.Research.CodeAnalysis.CacheManager`11.TestCache() 1> CodeContracts: ContractsStoreLibrary: at Microsoft.Research.CodeAnalysis.CacheManager`11..ctor(IEnumerable`1 cacheAccessorFactories, Dictionary`2 methodAnalyses, Dictionary`2 classAnalyses, GeneralOptions options) 1> CodeContracts: ContractsStoreLibrary: at Microsoft.Research.CodeAnalysis.CacheManager`11.Create(IEnumerable`1 cacheAccessorFactories, Dictionary`2 dictionary, Dictionary`2 dictionary_2, GeneralOptions generalOptions) 1> CodeContracts: ContractsStoreLibrary: at Microsoft.Research.CodeAnalysis.Clousot.TypeBinder`9..ctor(String[] args, IDecodeMetaData`9 mdDecoder, IDecodeContracts`5 contractDecoder, IDictionary assemblyCache, Action`4 setTargetPlatform, IOutputFullResultsFactory`2 externalOutputFactory, IEnumerable`1 cacheAccessorFactories) 1> CodeContracts: ContractsStoreLibrary: at Microsoft.Research.CodeAnalysis.Clousot.ClousotMain[Local,Parameter,Method,Field,Property,Event,Type,Attribute,Assembly](String[] args, IDecodeMetaData`9 mdDecoder, IDecodeContracts`5 contractDecoder, IDictionary assemblyCache, Action`4 setTargetPlatform, IOutputFullResultsFactory`2 outputFactory, IEnumerable`1 cacheAccessorFactories) 1> CodeContracts: ContractsStoreLibrary: at Microsoft.Research.CodeAnalysis.CCI1Driver.Main(String[] args, IOutputFullResultsFactory`2 outputFactory, IEnumerable`1 cacheAccessorFactories) 1> CodeContracts: ContractsStoreLibrary: at Microsoft.Research.CodeAnalysis.CCI1Driver.Main(String[] args) 1> CodeContracts: ContractsStoreLibrary: 1> CodeContracts: ContractsStoreLibrary: Static contract analysis done.
I am guessing this is a missing dependency in the installer file.
The SQL CE 3.5 download seems to have made this error go away (found here).
Cheers, Gordon.
- Edited by GordonWatts Tuesday, November 27, 2012 9:41 PM
All Replies
-
Wednesday, November 28, 2012 5:22 AMOwner
Yes, we are aware of the issue. Sorry about that :-(
The cache system can either use SQL CE or SQL Server, and we are working to use SQL Server express.
The time being, the best fix is to install SQL CE 3.5 (VS 2012 comes with SQL CE 4.0)
Thanks!
- Proposed As Answer by Francesco LogozzoMicrosoft Employee, Owner Wednesday, November 28, 2012 5:23 AM
-
Wednesday, November 28, 2012 5:56 PMNo worries. Thanks! Are there other issues with VS2012 - for example, getting the contract checking to run in the background in the 2012 Pro version?
Cheers, Gordon.

