Skip to content

TypeLoadException when generating from NuGet package #33

@GradientVector

Description

@GradientVector

After grabbing the NuGet package, I call

fake generate

but get the following exceptions:

Building project with version: LocalBuild
Shortened DependencyGraph for Target Generate:
<== Generate
<== Clean

The resulting target order is:
 - Clean
 - Generate
Starting Target: Clean
Deleting contents of C:\FsBlog\content\output/
Finished Target: Clean
Starting Target: Generate (==> Clean)
Running build failed.
Error:
System.TypeLoadException: Could not load type 'Microsoft.FSharp.Compiler.SourceCodeServices.InteractiveChecker'
 from assembly 'FSharp.Compiler.Service, Version=0.0.82.0, Culture=neutral, PublicKeyToken=null'.
   at FSharp.CodeFormat.CodeFormatAgent..ctor()
   at FSharp.Literate.Literate.parsingContext[a](FSharpOption`1 formatAgent, FSharpOption`1 evaluator, FSharpOp
tion`1 compilerOptions, FSharpOption`1 definedSymbols)
   at FSharp.Literate.Literate.ParseMarkdownFile[b](String path, FSharpOption`1 formatAgent, FSharpOption`1 com
pilerOptions, FSharpOption`1 definedSymbols, FSharpOption`1 references, FSharpOption`1 fsiEvaluator)
   at FSharp.Literate.Literate.ProcessMarkdown(String input, FSharpOption`1 templateFile, FSharpOption`1 output
, FSharpOption`1 format, FSharpOption`1 formatAgent, FSharpOption`1 prefix, FSharpOption`1 compilerOptions, FSh
arpOption`1 lineNumbers, FSharpOption`1 references, FSharpOption`1 replacements, FSharpOption`1 includeSource,
FSharpOption`1 layoutRoots)
   at FsBlogLib.BlogPosts.GetBlogHeaderAndAbstract[a,b](a transformer, b prefix, String file)
   at [email protected](Int32 i, String v)
   at [email protected](b& )
   at Microsoft.FSharp.Collections.IEnumerator.MapEnumerator`1.System-Collections-IEnumerator-MoveNext()
   at Microsoft.FSharp.Collections.SeqModule.ToArray[T](IEnumerable`1 source)
   at [email protected](Unit unitVar0)
   at [email protected](Unit unitVar0)
   at Microsoft.FSharp.Collections.SeqModule.ToArray[T](IEnumerable`1 source)
   at Microsoft.FSharp.Collections.ArrayModule.OfSeq[T](IEnumerable`1 source)
   at FsBlogLib.BlogPosts.LoadBlogPosts[a](IDictionary`2 tagRenames, a transformer, String blog)
   at FsBlogLib.Blog.LoadModel[a](IDictionary`2 tagRenames, a transformer, String root, String blog)
   at [email protected](Unit _arg15) in C:\FsBlog\content\fsblog.fsx:line 68
   at Fake.TargetHelper.runTarget@326(String targetName) in D:\code\fake\src\app\FakeLib\TargetHelper.fs:line 3
40

---------------------------------------------------------------------
Build Time Report
---------------------------------------------------------------------
Target     Duration
------     --------
Clean      00:00:00.0016739
Total:     00:00:00.0658933
Status:    Failure
---------------------------------------------------------------------
  1) System.TypeLoadException: Could not load type 'Microsoft.FSharp.Compiler.SourceCodeServices.InteractiveChe
cker' from assembly 'FSharp.Compiler.Service, Version=0.0.82.0, Culture=neutral, PublicKeyToken=null'.
   at FSharp.CodeFormat.CodeFormatAgent..ctor()
   at FSharp.Literate.Literate.parsingContext[a](FSharpOption`1 formatAgent, FSharpOption`1 evaluator, FSharpOp
tion`1 compilerOptions, FSharpOption`1 definedSymbols)
   at FSharp.Literate.Literate.ParseMarkdownFile[b](String path, FSharpOption`1 formatAgent, FSharpOption`1 com
pilerOptions, FSharpOption`1 definedSymbols, FSharpOption`1 references, FSharpOption`1 fsiEvaluator)
   at FSharp.Literate.Literate.ProcessMarkdown(String input, FSharpOption`1 templateFile, FSharpOption`1 output
, FSharpOption`1 format, FSharpOption`1 formatAgent, FSharpOption`1 prefix, FSharpOption`1 compilerOptions, FSh
arpOption`1 lineNumbers, FSharpOption`1 references, FSharpOption`1 replacements, FSharpOption`1 includeSource,
FSharpOption`1 layoutRoots)
   at FsBlogLib.BlogPosts.GetBlogHeaderAndAbstract[a,b](a transformer, b prefix, String file)
   at [email protected](Int32 i, String v)
   at [email protected](b& )
   at Microsoft.FSharp.Collections.IEnumerator.MapEnumerator`1.System-Collections-IEnumerator-MoveNext()
   at Microsoft.FSharp.Collections.SeqModule.ToArray[T](IEnumerable`1 source)
   at [email protected](Unit unitVar0)
   at [email protected](Unit unitVar0)
   at Microsoft.FSharp.Collections.SeqModule.ToArray[T](IEnumerable`1 source)
   at Microsoft.FSharp.Collections.ArrayModule.OfSeq[T](IEnumerable`1 source)
   at FsBlogLib.BlogPosts.LoadBlogPosts[a](IDictionary`2 tagRenames, a transformer, String blog)
   at FsBlogLib.Blog.LoadModel[a](IDictionary`2 tagRenames, a transformer, String root, String blog)
   at [email protected](Unit _arg15) in C:\FsBlog\content\fsblog.fsx:line 68
   at Fake.TargetHelper.runTarget@326(String targetName) in D:\code\fake\src\app\FakeLib\TargetHelper.fs:line 3
40
---------------------------------------------------------------------

I noticed that InteractiveChecker of FSharp.Compiler.Service.dll has been renamed to FSharpChecker. I think using an older version of FAKE might work. Can anyone help me track down the right version of FAKE to use?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions