Questions tagged [razorgenerator]

Generates source code from Razor files (.cshtml files), allowing them to be compiled into your assemblies. Supports MVC, Web Pages and standalone templates

This is a Custom Tool for Visual Studio that allows processing Razor files at design time instead of runtime, allowing them to be built into an assembly for simpler reuse and distribution.

See http://razorgenerator.codeplex.com/ for more information about this project. From there, you can access documentation, discuss the project and file bugs.

101 questions
84
votes
12 answers

Where can I find System.Web.Helpers, System.Web.WebPages, and System.Web.Razor?

I am following this article on RazorGenerator and it say's that I must add references to: System.Web.Helpers.dll System.Web.WebPages.dll System.Web.Razor.dll The only one I can see when I do Add Reference is System.Web.Razor, but I don't know…
Xaisoft
  • 42,877
  • 83
  • 270
  • 415
49
votes
1 answer

Visual Studio cannot find custom tool RazorGenerator

I've installed the NuGet package for RazorGenerator.mvc and then run the shell command Enable-RazorGenerator and get the following message: Exception calling "RunCustomTool" with "0" argument(s): "The custom tool 'RazorGenerator' failed. The…
SliverNinja - MSFT
  • 29,007
  • 10
  • 98
  • 161
26
votes
2 answers

Visual Studio 2013 holding on to the App_global.asax.PDB file?

Ever since upgrading to Visual Studio 2013 (From 2012), I've noticed that while debugging my ASP.NET MVC 5 app, I'll occasionally get a compiler error dump through IIS Express of: Description: An error occurred during the compilation of a…
Jeff Moser
  • 18,820
  • 6
  • 58
  • 83
17
votes
5 answers

RazorGenerator can't see custom cshtml helper

I'm having a problem with RazorGenerator: it can't compile views that uses my custom helper: App_Code/ViewHelper.cshtml @helper test(System.Web.Mvc.HtmlHelper html) {

Test

Krzysztof
  • 448
  • 3
  • 20
14
votes
1 answer

Print and/or modify the c# version that the razor compiler service uses to compile cshtml

I'd like to be able to find out which C# version razor uses to compile my cshtml templates. The reason why I want this, is this breaking change. We had a lambda in a foreach statement that worked fine on our local dev machines but produced a bug on…
Rob
  • 2,226
  • 1
  • 17
  • 39
12
votes
3 answers

Setting Layout in ActionFilterAttribute.OnActionExecuted is problematic

I'm trying to set the layout path in a custom ActionFilterAttribute I have written as follow: public class LayoutInjecterAttribute : ActionFilterAttribute { public override void OnActionExecuted(ActionExecutedContext filterContext) { …
Kaan
  • 902
  • 2
  • 15
  • 37
11
votes
2 answers

ASP.NET MVC EditorTemplate sub folders

I am working on, what I would consider to be, a large ASP.NET MVC website. Currently there are nearly 100 editor templates (all for 1 controller), and this number will grow. What I want to accomplish is organize my views to make them easier to find…
Jay McKinney
  • 109
  • 1
  • 4
11
votes
2 answers

MVC4 Using nested @Html.RenderPartial() throws Compiler Error Message: CS1502

I am using MVC 4 and wanted to tidy up my views a bit so decided to create multiple partial views and bring them together during the rendering. this works when the view being rendered has few @Html.RenderPartial('path\to\my\partialView.cshtml') but…
Kiran
  • 2,754
  • 5
  • 26
  • 61
11
votes
5 answers

The custom tool 'RazorGenerator' failed. The method or operation is not implemented

I have just upgraded the Visual Studio extension RazorGenerator to V1.5 (Last updated 10/14/2012) and now have the following problems. Each cshtml file edited now removes the generated file, if I choose to 'Run Custom Tool' I get The custom tool…
10
votes
3 answers

Razor Generator: how to use view compiled in a library as the partial view for master defined in main mvc project

We have an ASP.NET MVC 4 application with around 3000 views in it. We've decided to split this set of views into separated DLLs and compile it with RazorGenerator. We keep only main _Layout.cshtml and related files in the main MVC project. We cannot…
tomash
  • 665
  • 6
  • 17
9
votes
1 answer

Is it possible to save an MVC Razor view into an actual html file

We are building an MVC app that creates physical HTML pages. The app currently creates the pages dynamically using the normal MVC/Razor approach. Rather than re-creating the output programatically to a file, is there anyway to grab the result built…
Julian Dormon
  • 1,543
  • 4
  • 28
  • 53
7
votes
1 answer

RazorGenerator not generating the correct namespace

We're using RazorGenerator for our project. When I edit views, the generated files' namespaces are changed to ASP instead of the RazorGenerator's default, which is supposed to be the folder structure. We didn't change any settings for RazorGenerator…
dork
  • 3,438
  • 2
  • 20
  • 46
6
votes
1 answer

RazorViewEngine.FindView can't find the precompiled view

App.Web and App.Views are my projects in one solution, I put my views in App.Views and precompiled with RazorGenerator. It's working well if I used App.Web like, ~/Views/Index.cshtml is virtual path of my view in App.View It can successfully…
Okan Kocyigit
  • 12,633
  • 18
  • 64
  • 119
6
votes
0 answers

View Class Library // Razor Intellisense

I want to create a usable View class library, including views using Razor. I have troubles to implement Razor Intellisense in my views. I have already done a lot of research to find a solution, including this blog :…
Glad
  • 137
  • 1
  • 11
6
votes
0 answers

RazorGenerator PrecompiledMvcEngine cannot locate Partial View or Editor Templates across assemblies

I have a large MVC 4 site that is broken into one project per MVC Area. We use RazorGenerator to pre-compile all of our views into the project assembly for deployment and use the PrecompiledMvcEngine for our ViewEngine. I have just created a new…
Lucas
  • 7,815
  • 2
  • 27
  • 45
1
2 3 4 5 6 7