Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8744453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:50:34+00:00 2026-06-13T11:50:34+00:00

I’m trying to deploy my first AppHarbor-hosted app and have run into a problem

  • 0

I’m trying to deploy my first AppHarbor-hosted app and have run into a problem with my build. Everything builds fine until the code contracts try to rewrite the assemblies. The error in the log is:

CodeContractsRunCodeAnalysisInternal:
     CodeContracts: Task manager is unavailable (unable to run in background).
     CodeContracts: ABC: Run static contract analysis.
     CodeContracts: ABC: 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.
     CodeContracts: ABC:    at Microsoft.Research.CodeAnalysis.SQLCacheDataAccessor.GetMetadataOrNull(String key, Boolean silent)
     CodeContracts: ABC:    at Microsoft.Research.CodeAnalysis.CacheManager`11.TestCache()
     CodeContracts: ABC:    at Microsoft.Research.CodeAnalysis.CacheManager`11..ctor(Dictionary`2 methodAnalyses, Dictionary`2 classAnalyses, GeneralOptions options)
     CodeContracts: ABC:    at Microsoft.Research.CodeAnalysis.CacheManager`11.Create(Dictionary`2 dictionary, Dictionary`2 dictionary_2, GeneralOptions generalOptions)
     CodeContracts: ABC:    at Microsoft.Research.CodeAnalysis.Clousot.TypeBinder`9..ctor(String[] args, IDecodeMetaData`9 mdDecoder, IDecodeContracts`5 contractDecoder, IDictionary assemblyCache, Action`3 setTargetPlatform, IOutputFullResultsFactory`2 externalOutputFactory)
     CodeContracts: ABC:    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`3 setTargetPlatform)
     CodeContracts: ABC:    at Microsoft.Research.CodeAnalysis.CCI1Driver.Main(String[] args)
     CodeContracts: ABC: 
     CodeContracts: ABC: Static contract analysis done.

I know that when building locally with Visual Studio that the code contract stuff runs in a background thread. Maybe AppHarbor does not allow such threads to be created to do this? But what is this error about System.Data.SqlServerCe.dll missing? My code sure doesn’t use it but maybe the MS code contracts do?

Just wondering if anyone has successfully deployed code that has code contracts in it to AppHarbor and if so what did you do to make it work? It may be that SQL Server CE will need to be installed by AppHarbor in order for code contracts to work. Oh, and my build does not build the code contract reference assembly, it just tries to do the static checking and do the rewriting to get the run-time checks done.

Lastly, I did try disabling the code contracts from the AppHarbor.sln but that setting is a project setting and not a solution setting so it disables them for my regular solution file too.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T11:50:35+00:00Added an answer on June 13, 2026 at 11:50 am

    Figured it out. The .NET Code Contracts (the System.Diagnostics.Contracts namespace, for those who don’t know) has a feature that can do static analysis of the code based on the contracts that have been put into the code. If you have the Visual Studio add-on for code contracts installed you can go to a VS project’s property pages and click the Code Contract tab. In the Static Checking section there is an option called Cache Results. If you enable this then the static checking uses a SQL Server embedded database at build time to make whatever it does for its static code analysis run faster (apparently this file will persist in your project directory between compiles). This is a dependency that a build server has on SQL CE, it has nothing to do with the run-time environment for the app.

    Since AppHarbor does not have SQL CE on their build servers what I’ve done is to change each of my projects’ Code Contracts properties to do Perform Runtime Contract Checking and Perform Static Contract Checking for both Debug and Release builds, but for the Release build the Cache Results option in the Perform Static Contract Checking section is disabled. (Note also that since AppHarbor doesn’t allow background tasks to run from Visual Studio that the Check in Background option on the Perform Static Contract Checking section must also be disabled.)

    Why does it seem like I’m the only one that uses the System.Diagnostics.Contracts namespace (other than the .NET Framework itself)?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I am currently running into a problem where an element is coming back from
I am trying to loop through a bunch of documents I have to put
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I am trying to understand how to use SyndicationItem to display feed which is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.