title: CS1003: Syntax error, '>' expected in Razor
body: <p>I'm trying something new (to me) in using an abstract base class for my layout viewmodel.</p>
  
  <p>The problem is that when I run the site as is, it throws a very cryptic (to me) exception. What does this exception mean, and what might I do to resolve it?</p>
  
  <p><strong>Layout</strong></p>
  
  <pre><code>@model MyApp.Core.ViewModels.LayoutViewModel
  
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta name="viewport" content="width=device-width" /&gt;
      &lt;title&gt;@Model.Title&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div&gt;
         @RenderBody()
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>Index</strong></p>
  
  <pre><code>@model MyApp.Core.ViewModels.Home.IndexViewModel;
  
  @{
      Layout = "~/Views/Shared/_Layout.cshtml";
  }
  
  
  &lt;h1&gt;@Model.Body&lt;/h1&gt;
  </code></pre>
  
  <p><strong>LayoutViewModel</strong></p>
  
  <pre><code>namespace MyApp.Core.ViewModels
  {
      public abstract class LayoutViewModel
      {
          public string Title { get; set; }
      }
  }
  </code></pre>
  
  <p><strong>IndexViewModel</strong></p>
  
  <pre><code>namespace MyApp.Core.ViewModels.Home
  {
      public class IndexViewModel : LayoutViewModel
      {
          public string Body { get; set; }
      }
  }
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>[HttpGet]
  public ActionResult Index()
  {
      var model = new IndexViewModel
          {
              Title = "Hello World",
              Body = "Hello World"
          };
  
  
      return View(model);
  }
  </code></pre>
  
  <p>And the Exception</p>
  
  <blockquote>
    <p>Compilation Error    Description: An error occurred during the
    compilation of a resource required to service this request. Please
    review the following specific error details and modify your source
    code appropriately. </p>
    
    <p>Compiler Error Message: CS1003: Syntax error, '>' expected</p>
    
    <p>Source Error:</p>
  
  <pre><code>Line 27:
  Line 28:
  Line 29:     public class _Page_Views_Home_Index_cshtml : 
  System.Web.Mvc.WebViewPage&lt;FutureStateMobile.Core.ViewModels.Home.IndexViewModel;&gt;
  { 
  Line 30:          
  Line 31: #line hidden
  </code></pre>
    
    <p>Source File: c:\Users\Chase\AppData\Local\Temp\Temporary ASP.NET
    Files\root\b314e0d7\36f522db\App_Web_index.cshtml.a8d08dba.yr7oemfz.0.cs
    Line: 29</p>
  </blockquote>