ProjectScaffold icon indicating copy to clipboard operation
ProjectScaffold copied to clipboard

First build.sh fails with System.TypeLoadException

Open delexi opened this issue 9 years ago • 2 comments

I cloned this repo, cded into the cloned directory and executed ./build.sh. It then fails in the GenerateHelp-Target with the following output:

Starting Target: GenerateHelp (==> CleanDocs)
/home/delexi/code/ProjectScaffold/docs/content/release-notes.md does not exist.
/home/delexi/code/ProjectScaffold/docs/content/license.md does not exist.
fsharpi --define:RELEASE --define:HELP generate.fsx
Copying file: /home/delexi/code/ProjectScaffold/docs/output/img/logo-template.pdn
Copying file: /home/delexi/code/ProjectScaffold/docs/output/img/logo.png
Copying styles and scripts: /home/delexi/code/ProjectScaffold/docs/output/content/style.css
Copying styles and scripts: /home/delexi/code/ProjectScaffold/docs/output/content/style_light.css
Copying styles and scripts: /home/delexi/code/ProjectScaffold/docs/output/content/tips.js
Copying styles and scripts: /home/delexi/code/ProjectScaffold/docs/output/content/img/github-blue.png
Copying styles and scripts: /home/delexi/code/ProjectScaffold/docs/output/content/img/github.png
Generating '/home/delexi/code/ProjectScaffold/docs/tools/../content/index.html'
System.TypeLoadException: Could not load type '<StartupCode$FSharp-CodeFormat>.$CodeFormatAgent+lexer@289' from assembly 'FSharp.CodeFormat, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
  at Microsoft.FSharp.Control.AsyncBuilderImpl+args@789-1[Microsoft.FSharp.Compiler.SourceCodeServices.FSharpProjectOptions,System.Tuple`2[Microsoft.FSharp.Collections.FSharpList`1[FSharp.CodeFormat.Snippet],FSharp.CodeFormat.SourceError[]]].Invoke (Microsoft.FSharp.Compiler.SourceCodeServices.FSharpProjectOptions a) [0x00000] in <filename unknown>:0 
Stopped due to error
Running build failed.
Error:
System.Exception: generating help documentation failed
  at FSI_0001.Build.generateHelp' (Boolean fail, Boolean debug) [0x00000] in <filename unknown>:0 
  at [email protected] (Microsoft.FSharp.Core.Unit _arg1) [0x00000] in <filename unknown>:0 
  at Fake.TargetHelper+targetFromTemplate@155[Microsoft.FSharp.Core.Unit].Invoke (Microsoft.FSharp.Core.Unit unitVar0) [0x00000] in <filename unknown>:0 
  at Fake.TargetHelper.runSingleTarget (Fake.TargetTemplate`1 target) [0x00000] in <filename unknown>:0 

This is on Linux with

  • NuGet 2.8.50926.602
  • fsharp 3.1.1.31
  • mono 3.12.1

If you need more information or the complete output, please let me know.

delexi avatar Apr 06 '15 15:04 delexi

See also https://github.com/tpetricek/FSharp.Formatting/issues/277#issuecomment-90117760

Maybe try changing https://github.com/fsprojects/ProjectScaffold/blob/master/paket.dependencies#L3 to

nuget FSharp.Formatting 2.8.0
nuget FSharpVSPowerTools.Core 1.7.0

dsyme avatar Apr 06 '15 17:04 dsyme

@dsyme That makes it work for me, thanks!

delexi avatar Apr 06 '15 17:04 delexi