Quantcast
Channel: RazorGenerator Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 525

Commented Unassigned: RazorGenerator.MsBuild does not support ASP.Net MVC 5.1 or 5.2 (versions > 5.0) [163]

$
0
0
__RazorGenerator does not currently support MVC versions > 5.0 (i.e. 5.1 and 5.2)__

In environments such as build servers, where Visual Studio is not installed, projects utilizing the latest version of RazorGenerator and MVC versions > 5.0 will not be able to build unless version 5.0 of the System.Web.MVC assembly is manually loaded in to the GAC on the build server.

Since Visual Studio (2013 anyways) registers MVC 5.0 assemblies in the GAC, this is not an issue on machines where Visual Studio is installed. In production environments, this is also typically a non-issue, as binding redirection will make sure that the correct version of System.Web.MVC is referenced at runtime, even if 5.0 is referenced.
Comments: This issue wasted an entire day, please [remove RazorGenerator.MsBuild 2.3.0](https://www.nuget.org/packages/RazorGenerator.MsBuild). Don't waste peoples time if it's known to cause an issue. I added this to the [new GitHub home](https://github.com/RazorGenerator/RazorGenerator/issues/2) @Jignasa - thanks for identifying the root cause, as the symptoms are very strange. For us - it was complaining about being unable to resolve class references - despite their namespaces being present in `Views\web.config`. Once corrected with full namespace path, it would complain "Error 1 Could not precompile the file '\Views\Shared\myviewname.cshtml'. Ensure that a generator declaration exists in the cshtml file. A generator declaration is the first line of your cshtml file and looks like this: @* Generator: MvcHelper *@ Valid host names: MvcHelper, MvcView, Template, WebPagesHelper, WebPage, RazorGenerator.Core.IHostProvider ..\packages\RazorGenerator.MsBuild.2.3.0\build\RazorGenerator.MsBuild.targets 21 9 My Project The workaround is to manually copy the MVC 5 assembly from the previous package or locally (`System.Web.Mvc.dll`) and place it under `\packages\RazorGenerator.MsBuild.2.3.0\tools\v3` Please correct this!

Viewing all articles
Browse latest Browse all 525

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>