fsprojects / FsBlog

Blog aware, static site generation using F#.
http://fsprojects.github.io/FsBlog
132 stars 47 forks source link

Wont build under oxs/mono e.g. ./fake #29

Closed 7sharp9 closed 4 years ago

7sharp9 commented 10 years ago

Error message:

/Users/dave/code/FsBlog/fsblog.fsx(12,1): error FS0078: Unable to find the file 'SharpYaml.dll' in any of /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5 /Users/dave/code/FsBlog/packages/FAKE/tools/ /Users/dave/code/FsBlog /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.0/

tjaskula commented 9 years ago

Yeah, I have the same error

forki commented 9 years ago
#I "packages/FAKE/tools/"
#r "packages/FAKE/tools/FakeLib.dll"
#r "bin/FsBlogLib/RazorEngine.dll"
#r "bin/FsBlogLib/FsBlogLib.dll"
#r "bin/FsBlogLib/FSharp.Configuration.dll"

I think you should try to #I "bin/FsBlogLib". Unfortunately there is a issue with this on mono.

tjaskula commented 9 years ago

Thanks, this fix this issue. However it brings me to another issue related to Razor. Maybe some issues running razor on Mono:

'1) System.Exception: Processing the file '/Users/tjaskula/Documents/GitHub/Blog/source/blog/index.cshtml' failed with exception: RazorEngine.Templating.TemplateCompilationException: Unable to compile template. Assuming assembly reference FSharp.Core, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' matches assemblyFSharp.Core, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. You may need to supply runtime policy

Other compilation errors may have occurred. Check the Errors property for more information. at RazorEngine.Compilation.DirectCompilerServiceBase.CompileType (RazorEngine.Compilation.TypeContext context) [0x00000] in :0 at RazorEngine.Templating.TemplateService.CreateTemplateType (System.String razorTemplate, System.Type modelType) [0x00000] in :0 at RazorEngine.Templating.TemplateService.CreateTemplate (System.String razorTemplate, System.Type templateType, System.Object model) [0x00000] in :0 at RazorEngine.Templating.TemplateService.Parse (System.String razorTemplate, System.Object model, RazorEngine.Templating.DynamicViewBag viewBag, System.String cacheName) [0x00000] in :0 at RazorEngine.Razor.Parse (System.String razorTemplate, System.Object model, RazorEngine.Templating.DynamicViewBag viewBag, System.String cacheName) [0x00000] in :0 at FsBlogLib.Razor.ProcessFile (System.String source) [0x00000] in :0 Source written to: '/var/folders/8w/jh0v99196bs37zl_b_9s0kq40000gn/T/tmpe6fcb64.tmp.cs'. at FsBlogLib.Razor.ProcessFile (System.String source) [0x00000] in :0 at FsBlogLib.Blog.TransformFile (System.String template, Boolean hasHeader, FsBlogLib.Razor razor, Microsoft.FSharp.Core.FSharpOption1 prefix, System.String current, System.String target) [0x00000] in <filename unknown>:0 at FsBlogLib.Blog.GeneratePostListing[Tuple3,IEnumerable1] (System.String layouts, System.String template, System.String blogIndex, FsBlogLib.Model model, IEnumerable1 posts, Microsoft.FSharp.Core.FSharpFunc2 urlFunc, Microsoft.FSharp.Core.FSharpFunc2 needsUpdate, Microsoft.FSharp.Core.FSharpFunc2 infoFunc, Microsoft.FSharp.Core.FSharpFunc2 getPosts) [0x00000] in :0 at FSI_0001.Fsblog+clo@65.Invoke (Microsoft.FSharp.Core.Unit _arg15) [0x00000] in :0 at Fake.TargetHelper+targetFromTemplate@145[Microsoft.FSharp.Core.Unit].Invoke (Microsoft.FSharp.Core.Unit unitVar0) [0x00000] in :0 at Fake.TargetHelper.runTarget@317 (System.String targetName) [0x00000] in :0 '

tjaskula commented 9 years ago

maybe this will help : http://stackoverflow.com/questions/4239645/does-the-razor-view-engine-work-for-mono