Antaris / RazorEngine

Open source templating engine based on Microsoft's Razor parsing engine
http://antaris.github.io/RazorEngine
Other
2.14k stars 578 forks source link

MVC4-Compatible RazorEngine release #71

Closed Antaris closed 11 years ago

Antaris commented 12 years ago

Hi,

Sorry for still not getting round to this, as a stop-gap solution, you can download a version of RazorEngine which has System.Web.Razor.dll ILMerged and can be run from an MVC4 application.

http://www.fidelitydesign.net/downloads/RazorEngine-MVC4Compatible.zip

Within that assembly download there is a \nuget folder with the associated RazorEngine.dll.

Again, I'm sorry I haven't completed any additional work on this project in quite a while, it is still on my todo list.

Please let me know here if you have any issues with that assembly.

coxp commented 12 years ago

Hi,

I have hacked together a version that runs against Razor 2 in my fork.

https://github.com/coxp/RazorEngine

I am using this in production and all existing tests run but I haven't added any new tests to ensure all functionality is correct, and therefore didn't make a pull request.

Regards, Paul.

AlexBar commented 12 years ago

Don't you think it make sense to make a pull request even without tests for new functionality? It could be marked as beta and pushed to nuget "as is'. Tests could be written later. It would be great.

pjanuario commented 11 years ago

I agree with Alex, than everyone can choose if wants to upgrade or not!! It seems a better solution than building custom lib! :)

samjudson commented 11 years ago

Just a quick note - the merged DLL in the download does appear to have been merged against the .Net 4.5 binaries. You will likely get an error if you run this on a machine with .Net 4.0 on. We re-ran the merge on our own machine and it works fine however.

jlamfers commented 11 years ago

I implemented another razormachine built on Razor 2.0. It has built-in support for layouts and _viewStart as well. For anyone who might be interested.... https://github.com/jlamfers/RazorMachine

dlidstrom commented 11 years ago

Thanks for the workaround!

shelland commented 11 years ago

So, does it finally work with MVC 4? Or i still need to use a hacked version?

Antaris commented 11 years ago

Yes, v3.2.0 on Nuget supports MVC 4