첫 번째 AppHarbor-hosted app를 배포하려고하며 빌드에 문제가 있습니다. 코드 계약으로 어셈블리를 다시 작성할 때까지 모든 것이 잘됩니다. 로그의 오류는 다음과 같습니다코드 계약을 사용하여 AppHarbor에 빌드
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.
나는 코드 계약 물건 백그라운드 스레드에서 실행 Visual Studio를 사용하여 로컬 구축 할 때 것을 알고있다. 어쩌면 AppHarbor가 이런 쓰레드를 생성하는 것을 허용하지 않을 수도 있습니다. 그러나 System.Data.SqlServerCe.dll에 대한이 오류는 무엇입니까? 내 코드는 그것을 사용하지 않지만 어쩌면 MS 코드 계약은 사용합니까?
코드 계약이있는 코드를 AppHarbor에 성공적으로 배포 한 사람이 있는지 궁금한 점이 있습니까? 그렇다면 어떻게 작동하게 만들었습니까? 코드 계약이 작동하려면 AppHarbor이 SQL Server CE를 설치해야 할 수 있습니다. 오, 그리고 내 빌드 코드 계약 참조 어셈블리를 빌드하지 않습니다, 그냥 정적 검사를 수행하고 런타임 검사를 수행 할 재 작성을 수행합니다.
마지막으로, 코드 계약을 AppHarbor.sln에서 사용하지 않도록 설정했지만 프로젝트 설정과 솔루션 설정이 아니므로 일반 솔루션 파일에서도 사용할 수 없습니다.
SQL Server에 대한 codecontracts 요구 사항을 변경하는 방법을 찾아 냈습니까? CE? System.Data.SqlClient를 사용하는 localdb를 사용하는 것이 좋습니다. 이것은 AppHarbor 사용자를 알아 주셔서 감사합니다. 감사합니다! –
AppHarbor은 Visual Studio의 캐시 결과 기능을 빌드 서버에서 사용할 수 없으며 SQL CE를 사용합니다. 따라서 솔루션에서 해당 옵션을 해제하십시오 (두 번째 단락 참조). – gdoten
아, 이해합니다. 감사. –