¿Cuál es este error en el proyecto ASP.NET MVC 3 RTM?
I Crear un nuevo Proyecto ASP.NET MVC 3 RTM y reemplazar referencias para usar ASP.NET MVC 3Código fuente
pero cuando vuelvo a ejecutar el proyecto, obtengo esta excepción:
[A] System.Web.WebPages.Razor.Configuration.HostSection no se puede transmitir a [B] System.Web.WebPages.Razor.Configuration.HostSection. El tipo A se origina en 'System.Web.WebPages.Razor, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35' en el contexto 'Default' en la ubicación 'C: \ Windows \ Microsoft.Net \ assembly \ GAC_MSIL \ System .Web.WebPages.Razor \ v4.0_1.0.0.0__31bf3856ad364e35 \ System.Web.WebPages.Razor.dll '. El tipo B se origina en 'System.Web.WebPages.Razor, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = null' en el contexto 'Default' en la ubicación 'C: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Archivos ASP.NET temporales \ root \ 2505c7ee \ 369315c5 \ assembly \ dl3 \ f7bae428 \ d03eeed8_85bbcb01 \ System.Web.WebPages.Razor.DLL '.
Descripción: se produjo una excepción no controlada durante la ejecución de la solicitud web actual. Revise el seguimiento de la pila para obtener más información sobre el error y dónde se originó en el código.
Error de fuente:
Line 106: internal static RazorWebSectionGroup GetRazorSection(string virtualPath) {
Line 107: // Get the individual sections (we can only use GetSection in medium trust) and then reconstruct the section group
Line 108: return new RazorWebSectionGroup() {
Line 109: Host = (HostSection)WebConfigurationManager.GetSection(HostSection.SectionName, virtualPath),
Line 110: Pages = (RazorPagesSection)WebConfigurationManager.GetSection(RazorPagesSection.SectionName, virtualPath)
Archivo de origen: E: \ GreenTour \ webpages \ src \ System.Web.WebPages.Razor \ WebRazorHostFactory.cs Línea: 108