Repository navigation
Closed
Description
When trying to generate docs on Mono (v3.10 on OSX 10.10) it complains about a missing dll: /Users/devboy/Development/devboy/Paket.Unity3D/docs/tools/generate.fsx(30,1): error FS0078: Unable to find the file 'Microsoft.Web.XmlTransform.dll'
When adding the Microsoft.Web.Xdt dependency and add it to my generate.fsx #I "../../packages/Microsoft.Web.Xdt/lib/net40" I get the following error:
Processing the file 'docpage' failed
Source written to: '/var/folders/_d/n081d8b13hg_xtwhdk94cyx80000gn/T/tmp1743356.tmp.cs'
Compilation errors:
- error: (0, 0) Assembly `fsi, Version=4.3.1.0, Culture=neutral, PublicKeyToken=f536804aa0eb945b' references `FSharp.Core, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' which has a higher version number than imported assembly `FSharp.Core, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
System.Exception: Generating HTML failed.
at FSharp.Literate.RazorRender.handleCompile[String] (System.String source, Microsoft.FSharp.Core.FSharpFunc`2 f) [0x00000] in <filename unknown>:0
at FSharp.Literate.RazorRender.ProcessFile[IDictionary`2] (Microsoft.FSharp.Core.FSharpOption`1 properties) [0x00000] in <filename unknown>:0
at FSharp.Literate.Templating.generateFile (System.String contentTag, IEnumerable`1 parameters, Microsoft.FSharp.Core.FSharpOption`1 templateOpt, System.String output, IEnumerable`1 layoutRoots) [0x00000] in <filename unknown>:0
at FSharp.Literate.Templating.processFile (FSharp.Literate.LiterateDocument doc, System.String output, FSharp.Literate.ProcessingContext ctx) [0x00000] in <filename unknown>:0
at FSharp.Literate.Literate.ProcessMarkdown (System.String input, Microsoft.FSharp.Core.FSharpOption`1 templateFile, Microsoft.FSharp.Core.FSharpOption`1 output, Microsoft.FSharp.Core.FSharpOption`1 format, Microsoft.FSharp.Core.FSharpOption`1 formatAgent, Microsoft.FSharp.Core.FSharpOption`1 prefix, Microsoft.FSharp.Core.FSharpOption`1 compilerOptions, Microsoft.FSharp.Core.FSharpOption`1 lineNumbers, Microsoft.FSharp.Core.FSharpOption`1 references, Microsoft.FSharp.Core.FSharpOption`1 replacements, Microsoft.FSharp.Core.FSharpOption`1 includeSource, Microsoft.FSharp.Core.FSharpOption`1 layoutRoots, Microsoft.FSharp.Core.FSharpOption`1 generateAnchors) [0x00000] in <filename unknown>:0
at <StartupCode$FSharp-Literate>[email protected] (System.String file, System.String output) [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Core.FSharpFunc`2[System.String,System.String].InvokeFast[Unit] (Microsoft.FSharp.Core.FSharpFunc`2 func, System.String arg1, System.String arg2) [0x00000] in <filename unknown>:0
at <StartupCode$FSharp-Literate>.$Main.processDirectory@180 (Microsoft.FSharp.Core.FSharpOption`1 format, Microsoft.FSharp.Core.FSharpFunc`2 processScriptFile, Microsoft.FSharp.Core.FSharpFunc`2 processMarkdown, System.String indir, System.String outdir) [0x00000] in <filename unknown>:0
at FSharp.Literate.Literate.ProcessDirectory (System.String inputDirectory, Microsoft.FSharp.Core.FSharpOption`1 templateFile, Microsoft.FSharp.Core.FSharpOption`1 outputDirectory, Microsoft.FSharp.Core.FSharpOption`1 format, Microsoft.FSharp.Core.FSharpOption`1 formatAgent, Microsoft.FSharp.Core.FSharpOption`1 prefix, Microsoft.FSharp.Core.FSharpOption`1 compilerOptions, Microsoft.FSharp.Core.FSharpOption`1 lineNumbers, Microsoft.FSharp.Core.FSharpOption`1 references, Microsoft.FSharp.Core.FSharpOption`1 fsiEvaluator, Microsoft.FSharp.Core.FSharpOption`1 replacements, Microsoft.FSharp.Core.FSharpOption`1 includeSource, Microsoft.FSharp.Core.FSharpOption`1 layoutRoots, Microsoft.FSharp.Core.FSharpOption`1 generateAnchors) [0x00000] in <filename unknown>:0
at FSI_0002.buildDocumentation () [0x00000] in <filename unknown>:0
at <StartupCode$FSI_0002>.$FSI_0002.main@ () [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
I am not a .NET developer (just yet) and can't even find the 4.3.1.0 of FSharp.Core, or if that is even the real issue.
Can you give me any pointers?
Metadata
Metadata
Assignees
Labels
No labels
Activity
forki commentedon Nov 8, 2014
we also see this guy (Microsoft.Web.XmlTransform.dll) making trouble in
other FAKE builds. I assume there is something fucky in mono+FAKE.
2014-11-08 21:21 GMT+01:00 Dominic Graefen [email protected]:
devboy commentedon Nov 8, 2014
First of all it seems to be missing from Mono as I had to specifically add it, whereas on .NET it works just fine. Google is not really helpful either.
forki commentedon Nov 8, 2014
I think we need to get rid of it in FAKE. Could please open issue there?
On Nov 8, 2014 9:30 PM, "Dominic Graefen" [email protected] wrote:
devboy commentedon Nov 8, 2014
Could this be related to this issue here fsprojects/FSharp.Formatting#202
Theres some code snippet where it forces
FSharp.Core 4.3.1.0on Mono, but I can't see if that code made it into the release.forki commentedon Nov 8, 2014
mhm. you use paket, right? you could try to use latest FAKE and older FSharp.Formatting.
The we might see which one is guilty.
/cc @tpetricek @matthid
devboy commentedon Nov 8, 2014
Can you give me a hint which versions i should compare?
And yes, I use Paket.
forki commentedon Nov 8, 2014
fsprojects/FSharp.Formatting#202 was released in 2.4.26
devboy commentedon Nov 8, 2014
In 2.4.25 I am getting
System.TypeLoadException: Could not load type 'FSharp.CodeFormat.CodeFormatAgent' from assembly 'FSharp.CodeFormat, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.In 2.4.24 this
Going down the rabbit hole.
matthid commentedon Nov 8, 2014
One can work around the "System.Exception: Generation HTML failed." error with fsprojects/FSharp.Formatting#209 (which was reverted because FSharp.Formatting has to decide how to handle dependencies in the future). Basically if you want to have mono support right now you need to bundle your own version of FSharp.Formatting.
Because this error seems to come up quite often here a short explanation:
Basically RazorEngine references all currently loaded assemblies for the compilation, but for some assemblies the mono c# compiler throws compilation exceptions because the loaded assemblies seem to be incompatible (most often versioning problems like here)
matthid commentedon Nov 8, 2014
Because you mentioned it in the initial post FSharp.Core the 4.3.1.0 version is really weird on mono.
if you do something like Assembly.Load on the 4.3.1.0 verison you get the 4.3.0.0 Assembly...
Try the following in fsharpi on linux:
That's where the chaos begins.
devboy commentedon Nov 8, 2014
So i've built https://github.com/matthid/FSharp.Formatting/tree/razor_engine_update
but still getting:
devboy commentedon Nov 8, 2014
And changed my imports in the generate.fsx
matthid commentedon Nov 8, 2014
exactly, now you should be able to work around this by specifying the assemblies for compilation manually (as explained in fsprojects/FSharp.Formatting#209)... (ie specifying the references parameter in the modified FSharp.Formatting API... the ProcessDirectory call in your case).
Please tell me if you need more help.
devboy commentedon Nov 8, 2014
That makes sense. Overlooked that part. Will give it a try tomorrow.
tpetricek commentedon Nov 9, 2014
I'd be happy with anything that makes this work better.
I chatted with @swlaschin and a few others interested in F# Formatting and the general conclusion was that using DotLiquid would be much nicer - so this is the long term plan.
In the short term, I wouldn't mind using another NuGet package or even just packaging the DLLs we need with the project directly (yes, this breaks
generate.fsxscripts, but I think that's fine - most projects only update F# Formatting by hand - so they'll notice and the fix won't be that hard).now docs can be created on mono (fixes fsprojects#119).
matthid commentedon Jan 20, 2015
You can now try with #135.
devshorts commentedon Jul 26, 2015
Hey everyone, came to try out the scaffolds today on mono as well and getting a similar error:
matthid commentedon Jul 26, 2015
@devshorts This seems to be similar to fsprojects/FSharp.Formatting#323. Can you try to update your packages (especially mono)? Otherwise add the workaround I suggested in the linked issue.
edhzsz commentedon Oct 10, 2015
Also similar to #205. I have updated everything and I can still reproduce the issue. My workaround still works after updating everything.
My OSX 10.11 installation was a clean install. So right now I have a clean environment with the latests versions of XCode, Xamarin and Node on it.
For me, this is a OSX only issue as I am able to build the project as is on Windows and Ubuntu.
Building FSharp.Formatting on my Macbook generates the same error message when building its own documentation.