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

Closed Issue: RazorGenerator not generating complete code on .cshtml [102]

$
0
0
I'm running into an issue where it appears that razor generator is not generating complete code for some of my Shared Templates.

These are templates that are created from the "MvcSiteMap" package.

The Razor Code is listed here:
```
@model MvcSiteMapProvider.Web.Html.Models.MenuHelperModel
@using System.Web.Mvc.Html
@using MvcSiteMapProvider.Web.Html.Models
<ul id="menu">
@foreach (var node in Model.Nodes) {
<li id="@node.MetaAttributes["id"]">@Html.DisplayFor(m => node)
@if (node.Children.Any()) {
@Html.DisplayFor(m => node.Children)
}
</li>
}
</ul>
```

what is being generated by RazorGenerator is:
```
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18033
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace TP2012MVC.Views.Shared.DisplayTemplates
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;

#line 2 "..\..\Views\Shared\DisplayTemplates\MenuHelperModel.cshtml"
using System.Web.Mvc.Html;

#line default
#line hidden
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using MvcSiteMapProvider.Web.Html;

#line 3 "..\..\Views\Shared\DisplayTemplates\MenuHelperModel.cshtml"
using MvcSiteMapProvider.Web.Html.Models;

#line default
#line hidden

[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.4.0")]
public class MenuHelperModel : System.Web.WebPages.HelperPage
{
}
}
```

When the compiled code is being executed, the custom "id=@node....." is not being generated in the html.

Going through the generated models, I'm noticing that there are several of these templates that the class generated is empty.

This is RazorGenerator.Mvc 1.5.5.0
RazorGenerator Extension 1.5.4
Visual Studio 2012
MVC 4 (asp.net 4.5 application)

Any advice would be appreciated.

Viewing all articles
Browse latest Browse all 525

Trending Articles



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