title: ASP.Net MVC error - Bad IL format
body: <p>I'm following the <a href="http://www.asp.net/learn/mvc-videos/video-395.aspx" rel="nofollow noreferrer">ASP.Net MVC "TaskList" example video</a> and on clicking Run in Visual Studio (~14:00 min into the video) I'm getting the following error message in the browser:</p>
  
  <pre><code>Server Error in '/' Application.
  
  Bad IL format.
  Description: An unhandled exception occurred during the execution of the 
  current webrequest. Please review the stack trace for more information 
  about the error andwhere it originated in the code.
  
  Exception Details: System.BadImageFormatException: Bad IL format.
  
  Source Error:
  
  Line 12:         ' (2) URL with parameters
  Line 13:         ' (3) Parameter defaults
  Line 14:         routes.MapRoute( _
  Line 15:             "Default", _
  Line 16:             "{controller}/{action}/{id}", _
  
  
  Source File: C:\Users\...\TaskList\TaskList\Global.asax.vb    Line: 14
  
  Stack Trace:
  
  [BadImageFormatException: Bad IL format.]
     VB$AnonymousType_0`3..ctor(T0 controller, T1 action, T2 id) +0
     TaskList.MvcApplication.RegisterRoutes(RouteCollection routes) in
      C:\Users\...\TaskList\TaskList\Global.asax.vb:14
     TaskList.MvcApplication.Application_Start() in
      C:\Users\...\TaskList\TaskList\Global.asax.vb:23
  
  
  Version Information:
     Microsoft .NET Framework Version:2.0.50727.1434;
     ASP.NET Version:2.0.50727.1434 
  </code></pre>
  
  <p>I've double-checked the code I've typed in, what am I missing?</p>
  
  <p>Thank you!</p>
  
  <p>Versions:</p>
  
  <ul>
  <li>ASP.Net MVC Beta  (16th October 2008)</li>
  <li>Visual Studion 2008 (9.0.21022.8 RTM)</li>
  <li>Vista Ultimate SP1</li>
  <li>IIS 7.0.6000.16386</li>
  </ul>