Closed rahuldhariya01 closed 9 years ago
I think nuget is resolving Razor to version 4 and therefore it is not working because RazorEngine needs Razor 3?
So what is the solution ? it is production issue. please help.
Try adding another reference to Razor3.
You mean RazorEngine ? or System.Web.Razor ? i did try to go back to razor3 then i have several issue in my project. Please help/
Anyone can help ?
Was this resolved?
@girish No girish. No solution. i am thinking to remove this plugin from project. do you know anything else?
For the moment, I have switched to HandleBars.Net. I have retained the RazorEngine code because that is my first preference, but I too am stuck with the same issue and there is not much time to investigate it, so I had to switch.
Here are the links to HandleBars.Net:
Github repo: https://github.com/rexm/Handlebars.Net Nuget: https://www.nuget.org/packages/Handlebars.Net/
In your project.json
file, what are your targets? There is currently no build of RazorEngine that supports CoreCLR, mainly because it's quite a big undertaking at this stage to support that.
Can you try removing the CoreCLR targets (in frameworks
) and add a target for dnx451
or dnx46
and see if that resolves your problem?
@rahuldhariya01 Can you put a minimal repo on GitHub, or available as a download somewhere so we can investigate and confirm?
@girish-a Incidentally on the topic of handlebars, I am currently looking for testers who are looking to test an alternative Handlebars .NET implementation for my FuManchu project.
@Antaris thanks for the response. In my case, yes I have removed the core clr targets and included only dnx46.
I have uploaded the problematic code to this repo: https://github.com/girish-a/try
I don't want to hijack @rahuldhariya01's issue thread, but I am facing a similar problem and have logged an issue for it as well : https://github.com/Antaris/RazorEngine/issues/309
In my case, the unit test works but web api doesn't.
@Antaris, the FuManchu project is interesting. Will take a look at it sometime.
@rahuldhariya01 Can you try https://www.nuget.org/packages/RazorEngine/4.2.0-beta3 ?
And as @Antaris has already mentioned CoreCLR is not supported so dnxcore
will not work, but dnx451
or dnx46
should work.
Continued in #322
I am getting this error with new mvc version Error : Could not load file or assembly 'System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.
It was working fine with previous verion of visual studio 2015 RC but as soon as i have updated to visual studio 2015 enterprise this update the dependencies and i am getting this error.
My project json with visual studio 2015
"dependencies": { "EntityFramework.SqlServer": "7.0.0-beta5", "EntityFramework.Commands": "7.0.0-beta5", "Microsoft.AspNet.Mvc": "6.0.0-beta5", "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta5", "Microsoft.AspNet.Authentication.Cookies": "1.0.0-beta5", "Microsoft.AspNet.Authentication.Facebook": "1.0.0-beta5", "Microsoft.AspNet.Authentication.Google": "1.0.0-beta5", "Microsoft.AspNet.Authentication.MicrosoftAccount": "1.0.0-beta5", "Microsoft.AspNet.Authentication.Twitter": "1.0.0-beta5", "Microsoft.AspNet.Diagnostics": "1.0.0-beta5", "Microsoft.AspNet.Diagnostics.Entity": "7.0.0-beta5", "Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta5", "Microsoft.AspNet.Server.IIS": "1.0.0-beta5", "Microsoft.AspNet.Server.WebListener": "1.0.0-beta5", "Microsoft.AspNet.StaticFiles": "1.0.0-beta5", "Microsoft.AspNet.Tooling.Razor": "1.0.0-beta5", "Microsoft.Framework.Configuration.Abstractions": "1.0.0-beta5", "Microsoft.Framework.Configuration.Json": "1.0.0-beta5", "Microsoft.Framework.Configuration.UserSecrets": "1.0.0-beta5", "Microsoft.Framework.Logging": "1.0.0-beta5", "Microsoft.Framework.Logging.Console": "1.0.0-beta5", "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-beta5", "AutoMapper": "4.0.4", "Server.DataTier": { }, "RazorEngine": "3.7.0"
},
please help. this is very urgent.