-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Updating Razor to official MS version #1479
Updating Razor to official MS version #1479
Conversation
Several failing tests so can't pull this in .. I've re-run the build but it's definitely a "proper" fail rather than Mono being daft. |
Why 2.0 and not 3.0? |
@luisrudge 3.0 requires 4.5 I think.. although I don't think there's any reason for them to build it that way :( |
Yep, 3.0 is .NET 4.5 only |
http://www.asp.net/visual-studio/overview/2013/release-notes#TOC14 It would be really hard to use nancy with asp.net mvc 5 then? |
@luisrudge - no, this would just make it easier to use binding redirects for 3.0 and make it easier to support Nancy + MVC in a single app. We don't use any advanced features from Razor besides templating anyway. Razor 3 doesn't actually use anything form .NET 4.5, and could be built on 4.0 if they wanted. I donno the purpose behind their choose to go 4.5. |
Well, but a new mvc project comes with razor 3, and, if i install nancy.razor, it will come with mvc 2, right? or it will work with mvc 3 just fine? |
Binding Redirects. |
Why do you still want to support .NET 3 tho? |
@stanislavromanov We don't. .NET 4.0 is good enough 😄 |
@stanislavromanov we don't, we support .net 4 and above, |
Preliminary checks tell me that the ReSharper plugin will not be affected by this change. I'll allow it :D |
Thanks for signing off @hmemcpy ;) |
Given this isn't the latest version of razor, because of the 4.5 issue, wont this actually make us less compatible with projects that use razor, or will an automatic huge binding redirect work? That needs to be checked, if it hasn't already, before this comes in. |
Huge==nuget |
I want to get this in for the CI build to test everything. I've tested with a locally built and it works with a binding redirect to 3.0. But like I say. Want a CI all to double test and make sure. -----Original Message----- Huge==nuget |
Locally built as in you've directly referenced the assembly, or as in you've manually built the nuget locally and installed it via nuget with a local package source? |
I built the project locally and then referenced those. That worked for me, On Mon, May 12, 2014 at 1:49 PM, Steven Robbins notifications@github.comwrote:
Kind Regards, |
But it can't go into a CI build until it's been tested, and the only way to test this is to build the package locally and use a local nuget repo to install it alongside the latest MVC and see what happens. |
If we get it into CI we would risk having someone fork master and then risk having those forks screwed up if we had to rollback the changes, thus rewriting history. We can't pull stuff into |
With our CI (for our priv work stuff) we have it look at can we have a build that kicks in when |
I don't see any reason to have that when it's one command from the commandline to build the packages yourself. Plus, we are running on a free azure subscription so putting additional load on the CI may well push us over the limits. |
Ok when you build the package locally send me the zip with the nugets so I can test. |
Hmm why don't you build it yourself? It's as simple as |
I assumed he was -ing |
Simple if you have all that setup... Not something that has ever worked for me. |
Pulled this locally and created the nugets: |
So far testing isn't going well. It looks like MVC steals the razor files and pre-compiles them making them unusable for Nancy. The result is Nancy will render a blank page. |
Steals them? How? All we need is the file on the disk, we do our own thing after that.. unless there's some horrible hardwiring going on inside razor itself? |
I'm not sure @grumpydev I created a new MVC App... Returned "Hello World from MVC" and "Hello World from Nancy" Both these work. I Then created a View that output some text from a model. Wired it up in Nancy. Ran it. It works... I then created an action in MVC and told it to use the same view. The view is rendered by MVC, but now blank in Nancy... I comment out the MVC stuff, works in Nancy.... It's like the Razor thing is caching it. |
I got it all working, the web.config got messed up and was causing weird results in testing. OK so I've tested:
This is all with and without View Models, and layouts. Everything seems to be working perfectly. Note: All this was done using shared views (same view used by both Nancy and MVC) and the only thing that is an issue would be using the Nancy Base View. It will cause an exception, but that's fine IMO. I expected an exception when I tested that. |
Updating Razor to official MS version
👍 |
❤️ |
PR for #1325