在构建我的一个大型项目时,我遇到了一个奇怪的FSharp.Core
相关错误,并且该错误不包含任何位置信息来帮助我找出问题所在。
编译错误是error FS0193: The module/namespace 'Microsoft.FSharp.Linq.RuntimeHelpers' from compilation unit 'FSharp.Core' did not contain the namespace, module or type 'LeafExpressionConverter'
起初我以为是因为该项目使用了旧的 Powerpack LINQ 东西,所以我把它去掉了。然后我想这可能与使用 Entity Framework 4.3 而不是 5.0 有关,所以我升级了它。同样的错误。我仍在编译为 .NET 4.0,而不是 4.5……也许这是部分原因?
我将Doctypes.fsproj
XML 与同一解决方案中的其他项目进行了比较,一切看起来都很正常。参考FSharp.Core
很简单<Reference Include="FSharp.Core" />
这是一个非常大的项目,因此创建此错误的可重现的小版本可能需要我一段时间才能弄清楚,我想知道这里是否有人能快速回答。
这是 MSBUILD 输出:
19> C:\Program Files (x86)\Microsoft SDKs\F#\3.0\Framework\v4.0\fsc.exe -o:obj\Debug\DTC.Doctypes.dll -g --debug:full --noframework --define:DEBUG --define:TRACE --doc:bin\Debug\Doctypes.XML --optimize- --tailcalls- --resource:statutes_ebook_cover.jpg -r:A:\svn\dtc\Publisher\Doctypes\bin\Debug\CsvHelper.dll -r:A:\svn\dtc\Publisher\Data\bin\Debug\DTC.Data.dll -r:A:\svn\dtc\Publisher\Formats\bin\Debug\DTC.Formats.dll -r:A:\svn\dtc\Publisher\Parser\bin\Debug\DTC.Parser.dll -r:A:\svn\dtc\Publisher\ReferenceParser\bin\Debug\DTC.ReferenceParser.dll -r:A:\svn\dtc\Publisher\Shared\bin\Debug\DTC.Shared.dll -r:A:\svn\dtc\Publisher\Solr\bin\Debug\DTC.Solr.dll -r:A:\svn\dtc\Publisher\Utilities\bin\Debug\DTC.Utilities.dll -r:A:\svn\dtc\Publisher\Doctypes\bin\Debug\EntityFramework.dll -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\2.0\Runtime\v4.0\FSharp.Core.dll" -r:A:\svn\dtc\Publisher\packages\HtmlAgilityPack.1.4.6\lib\Net40\HtmlAgilityPack.dll -r:A:\svn\dtc\Publisher\packages\DotNetZip.1.9.1.8\lib\net20\Ionic.Zip.dll -r:A:\svn\dtc\Publisher\packages\LegislativeData.1.0.2773.180\lib\net40\LegislativeData.dll -r:A:\svn\dtc\Publisher\packages\LibrarianData.1.0.2773.6\lib\net40\Librarian.Data.dll -r:A:\svn\dtc\Lib\Office12\Microsoft.Office.Interop.Excel.dll -r:A:\svn\dtc\Lib\Office12\Microsoft.Office.Interop.Word.dll -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll" -r:A:\svn\dtc\Publisher\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll -r:A:\svn\dtc\Publisher\Repository\bin\Debug\Repository.dll -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.ComponentModel.DataAnnotations.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Configuration.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.Entity.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Numerics.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Runtime.Serialization.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.dll" --target:library --warn:4 --warnaserror --warnaserror:76 --vserrors --validate-type-providers --LCID:1033 --utf8output --fullpaths --flaterrors --highentropyva- "C:\Users\dfitch\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.fs" Helpers.fs Paths.fs FolioImport.fs Epub.fs Kindle.fs Ebooks.fs SharedLaw.fsi SharedLaw.fs SharedIndex.fs HistoryLinks.fs AdministrativeCodeHeaders.fs AdministrativeCode.fs AdministrativeCodeTOC.fs AdministrativeCodeIndex.fs SCRHeaders.fs Register.fs StatuteHeaders.fs Statutes.fs StatutesTOC.fs StatutesIndex.fs CrossReferences.fs SupremeCourtRules.fs Constitution.fs SessionTypes.fs CrDocs.fs EmergencyRules.fs OracleSession.fs LatsSession.fs TestSessionData.fs Session.fs Votes.fs SessionText.fs FiscalEstimates.fs LatsBulletinIndex.fs SharedBulletinIndex.fs AuthorIndex.fs SubjectIndex.fs JournalIndex.fs CrIndex.fs ActIndex.fs SectionsAffected.fs LCAmendmentMemos.fs LCActMemos.fs LCDocuments.fs RecordsOfCommitteeProceedings.fs VetoMessages.fs AssemblyInfo.fs Journals.fs Calendars.fs ProposalText.fs AmendmentText.fs EnrolledBillsText.fs RDAttachments.fs ActText.fs Budget.fs LegislativeRules.fs DraftingManual.fs AdminRulesManual.fs DraftingFiles.fs ExecutiveOrders.fs CapitolHeadlines.fs TownLawForms.fs FolioBillHist.fs FolioLaw.fs FolioSessionImport.fsi FolioSessionImport.fs FolioSession.fs FolioMisc.fs FolioIndexes.fs FolioCr.fs Wislaw.fs Help.fs Disclaimers.fs Dnotes.fs CCC.fs LCMemos.fs oag.fs AdministrativeCodeCites.fs StatutesRepealedRenumbered.fs LRBUserProcedures.fs LRBDraftingManual.fs
19>FSC: error FS0193: The module/namespace 'Microsoft.FSharp.Linq.RuntimeHelpers' from compilation unit 'FSharp.Core' did not contain the namespace, module or type 'LeafExpressionConverter'
19>C:\Program Files (x86)\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets(155,9): warning MSB5021: "Fsc" and its child processes are being terminated in order to cancel the build.
19>C:\Program Files (x86)\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets(155,9): error : Build was canceled.