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

Created Unassigned: Helper in App_Code does not compile [108]

$
0
0
Hi,

I've setup an empty MVC project and RazorGenerator (2.0.1) and RazorGenerator (1.5.3.0) as explained in http://www.dzone.com/links/r/precompiling_razor_views_in_aspnet_mvc_3.html.
(in short: add packages and add build targets and then voila)

It works fine except when I put a simple helper to App_Code like this
``` CS
@helper FailMiserably()
{
var ctx = Context;
}
```

It gives "The name 'Context' does not exists in the current context". It works fine if I turn RazorGenerator off.

I've also tried
``` CS
@* Generator: MvcHelper *@
```

but does not solve the problem.

I looked at the generated cs code in `obj\CodeGen\App_Code`. I saw that helper class `MyHelper` does not inherit from `HelperPage` class. Is this normal?

Viewing all articles
Browse latest Browse all 525

Trending Articles



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