ASP.Net MVC 1.1 For VS2010的一个Bug和临时解决办法

使用ASP.Net Mvc 1.1 For VS2010时发现一个Bug,一旦使用View(Model)的方式返回视图时,如:

Return View(dinners)

在调试的时候VS2010便会崩溃,具体原因不明

本人使用以下办法绕过

Controller:

    Function Index() As ActionResult          'Response.Write("<h1>Coming Soon: Dinners</h1>")          Dim dinners = dinnerRepository.FindUpcomingDinners.ToList          ViewData("Model") = dinners          Return View()      End Function

View:

<%@ Page Title="" Language="VB" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>    <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">      Index  </asp:Content>  <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">  <%Dim Model=CType(ViewData("Model"),List(Of NerdDinnerVB.Dinner))%>      <h2>          Upcoming Dinners</h2>      <ul>          <% For Each item In Model%>          <li>              <%=Html.ActionLink(item.Title, "Details", New With {.id=item.DinnerID }) %>              n              <%=Html.Encode(item.EventDate.ToShortDateString())%>              @              <%=Html.Encode(item.EventDate.ToShortTimeString())%>          </li>          <% Next%>      </ul>  </asp:Content>