SuaveIO / suave

Suave is a simple web development F# library providing a lightweight web server and a set of combinators to manipulate route flow and task composition.
https://suave.io
Other
1.32k stars 196 forks source link

Referencing Razor on Azure WebSite machine #247

Closed tpetricek closed 9 years ago

tpetricek commented 9 years ago

I was trying to use Suave.Razor on a Azure WebSite machine - this was through app.fsx script that was executed by FAKE. However, I was getting the following error:

Could not load file or assembly 'System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference

This is a bit weird because (AFAIK) there is no version of this library in GAC on the machine and RazorEngine references version 3.0.0.0 (so I actually do not get why it would even try loading version 2.0.0.0).

But I know that @matthid was debugging the same error in F# Formatting, so perhaps he can help us with this! @matthid - do you know what was the core of the problem? I tried to force load Razor (see the three Razor related commits here), but I'm not sure I was doing the same thing as you in F# Formatting.

Getting this to work would be very nice - using Suave with Razor was pretty nice experience :-). Though we could try supporting DotLiquid as a more light-weight alternative.

matthid commented 9 years ago

There is a bunch of possible causes for this:

I hope this helps identifying the issue!

tpetricek commented 9 years ago

@matthid - Thanks! I did not realize the package has two different versions - that must be it....

haf commented 9 years ago

Did this issue resolve itself?

tpetricek commented 9 years ago

Not yet…

I did try changing the path (to the 45 version rather than 40 version), but then I started getting another error (sorry, don’t have an exact log, but it was saying something along the lines of “inheritance access violation”). So, I think I (or someone else!) need to look more into this.

haf commented 9 years ago

Closing until it's clear what the issue is about. More info -> open again.