title: ASP.NET vNext - MissingMethodException: Method not found: Microsoft.CodeAnalysis.Diagnostic> EmitResult.get_Diagnostics()'
body: <p>I upgraded this morning to VS2015 RC, and I created a new project using the ASP.NET 5 Template - Web Site. I have an error that I am not able to solve:</p>
  
  <blockquote>
    <p>An unhandled exception occurred while processing the request.</p>
    
    <p>MissingMethodException: Method not found:
    'System
    .Collections.Immutable.ImmutableArray`1
    Microsoft.CodeAnalysis.Emit.EmitResult.get_Diagnostics()'.</p>
    
    <p>Microsoft.AspNet.Mvc.Razor.RoslynCompilationService.Compile(RelativeFileInfo
    fileInfo, String compilationContent)</p>
  </blockquote>
  
  <p>Here is the full error stack:</p>
  
  <blockquote>
    <p>MissingMethodException: Method not found:
    'System.Collections.Immutable.ImmutableArray`1
    Microsoft.CodeAnalysis.Emit.EmitResult.get_Diagnostics()'.</p>
    
    <p>Microsoft.AspNet.Mvc.Razor.RoslynCompilationService.Compile(RelativeFileInfo
    fileInfo, String compilationContent)</p>
    
    <p>Microsoft.AspNet.Mvc.Razor.RazorCompilationService.Compile(RelativeFileInfo
    file)</p>
    
    <p>Microsoft.AspNet.Mvc.Razor.CompilerCache.OnCacheMiss(RelativeFileInfo
    file, String normalizedPath, Func`2 compile)</p>
    
    <p>Microsoft.AspNet.Mvc.Razor.CompilerCache.GetOrAddCore(String
    relativePath, Func`2 compile)</p>
    
    <p>Microsoft.AspNet.Mvc.Razor.CompilerCache.GetOrAdd(String relativePath,
    Func`2 compile)</p>
    
    <p>Microsoft.AspNet.Mvc.Razor.VirtualPathRazorPageFactory.CreateInstance(String
    relativePath)</p>
    
    <p>Microsoft.AspNet.Mvc.Razor.RazorViewEngine.LocatePageFromViewLocations(ActionContext
    context, String pageName, Boolean isPartial)</p>
    
    <p>Microsoft.AspNet.Mvc.Razor.RazorViewEngine.GetRazorPageResult(ActionContext
    context, String pageName, Boolean isPartial)</p>
    
    <p>Microsoft.AspNet.Mvc.Razor.RazorViewEngine.FindView(ActionContext
    context, String viewName)</p>
    
    <p>Microsoft.AspNet.Mvc.Rendering.CompositeViewEngine.FindView(ActionContext
    context, String viewName, Boolean partial)</p>
    
    <p>Microsoft.AspNet.Mvc.Rendering.CompositeViewEngine.FindView(ActionContext
    context, String viewName)</p>
    
    <p>Microsoft.AspNet.Mvc.ViewResult.d__20.MoveNext()</p>
    
    <p>--- End of stack trace from previous location where exception was thrown ---</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.GetResult()</p>
    
    <p>Microsoft.AspNet.Mvc.Core.FilterActionInvoker.d__44.MoveNext()</p>
    
    <p>--- End of stack trace from previous location where exception was thrown ---</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.GetResult()</p>
    
    <p>Microsoft.AspNet.Mvc.Core.FilterActionInvoker.d__43.MoveNext()</p>
    
    <p>--- End of stack trace from previous location where exception was thrown ---</p>
    
    <p>System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()</p>
    
    <p>Microsoft.AspNet.Mvc.Core.FilterActionInvoker.d__42.MoveNext()</p>
    
    <p>--- End of stack trace from previous location where exception was thrown ---</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.GetResult()</p>
    
    <p>Microsoft.AspNet.Mvc.Core.FilterActionInvoker.d__37.MoveNext()</p>
    
    <p>--- End of stack trace from previous location where exception was thrown ---</p>
    
    <p>System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()</p>
    
    <p>Microsoft.AspNet.Mvc.Core.FilterActionInvoker.d__32.MoveNext()</p>
    
    <p>--- End of stack trace from previous location where exception was thrown ---</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.GetResult()</p>
    
    <p>Microsoft.AspNet.Mvc.MvcRouteHandler.d__3.MoveNext()</p>
    
    <p>--- End of stack trace from previous location where exception was thrown ---</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.GetResult()</p>
    
    <p>Microsoft.AspNet.Mvc.MvcRouteHandler.d__2.MoveNext()</p>
    
    <p>--- End of stack trace from previous location where exception was thrown ---</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.GetResult()</p>
    
    <p>Microsoft.AspNet.Routing.Template.TemplateRoute.d__25.MoveNext()</p>
    
    <p>--- End of stack trace from previous location where exception was thrown ---</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.GetResult()</p>
    
    <p>Microsoft.AspNet.Routing.RouteCollection.d__10.MoveNext()</p>
    
    <p>--- End of stack trace from previous location where exception was thrown ---</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.GetResult()</p>
    
    <p>Microsoft.AspNet.Builder.RouterMiddleware.d__4.MoveNext()</p>
    
    <p>--- End of stack trace from previous location where exception was thrown ---</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.GetResult()</p>
    
    <p>Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.d__10.MoveNext()</p>
    
    <p>--- End of stack trace from previous location where exception was thrown ---</p>
    
    <p>System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()</p>
    
    <p>Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.d__10.MoveNext()</p>
    
    <p>--- End of stack trace from previous location where exception was thrown ---</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.GetResult()</p>
    
    <p>Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.d__10.MoveNext()</p>
    
    <p>--- End of stack trace from previous location where exception was thrown ---</p>
    
    <p>System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()</p>
    
    <p>Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.d__10.MoveNext()</p>
    
    <p>--- End of stack trace from previous location where exception was thrown ---</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.GetResult()</p>
    
    <p>Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.d__10.MoveNext()</p>
    
    <p>--- End of stack trace from previous location where exception was thrown ---</p>
    
    <p>System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()</p>
    
    <p>Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.d__10.MoveNext()</p>
    
    <p>--- End of stack trace from previous location where exception was thrown ---</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.GetResult()</p>
    
    <p>Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.d__10.MoveNext()</p>
    
    <p>--- End of stack trace from previous location where exception was thrown ---</p>
    
    <p>System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()</p>
    
    <p>Microsoft.AspNet.Authentication.AuthenticationMiddleware`1.d__10.MoveNext()</p>
    
    <p>--- End of stack trace from previous location where exception was thrown ---</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.GetResult()</p>
    
    <p>System.Threading.Tasks.EntityFrameworkTaskExtensions.CultureAwaiter.GetResult()</p>
    
    <p>Microsoft.AspNet.Diagnostics.Entity.DatabaseErrorPageMiddleware.d__6.MoveNext()</p>
    
    <p>--- End of stack trace from previous location where exception was thrown ---</p>
    
    <p>System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()</p>
    
    <p>Microsoft.AspNet.Diagnostics.Entity.DatabaseErrorPageMiddleware.d__6.MoveNext()</p>
    
    <p>--- End of stack trace from previous location where exception was thrown ---</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task)</p>
    
    <p>System.Runtime.CompilerServices.TaskAwaiter.GetResult()</p>
    
    <p>Microsoft.AspNet.Diagnostics.ErrorPageMiddleware.d__4.MoveNext()</p>
  </blockquote>
  
  <p>My project.json file is the same as provided in the template:</p>
  
  <pre><code>{
    "webroot": "wwwroot",
    "userSecretsId": "aspnet5-WebApplication2-2819f43f-7688-4637-89a0-d22341b36a64",
    "version": "1.0.0-*",
  
    "dependencies": {
      "EntityFramework.SqlServer": "7.0.0-beta4",
      "EntityFramework.Commands": "7.0.0-beta4",
      "Microsoft.AspNet.Mvc": "6.0.0-beta4",
      "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta4",
      "Microsoft.AspNet.Authentication.Cookies": "1.0.0-beta4",
      "Microsoft.AspNet.Authentication.Facebook": "1.0.0-beta4",
      "Microsoft.AspNet.Authentication.Google": "1.0.0-beta4",
      "Microsoft.AspNet.Authentication.MicrosoftAccount": "1.0.0-beta4",
      "Microsoft.AspNet.Authentication.Twitter": "1.0.0-beta4",
      "Microsoft.AspNet.Diagnostics": "1.0.0-beta4",
      "Microsoft.AspNet.Diagnostics.Entity": "7.0.0-beta4",
      "Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta4",
      "Microsoft.AspNet.Server.IIS": "1.0.0-beta4",
      "Microsoft.AspNet.Server.WebListener": "1.0.0-beta4",
      "Microsoft.AspNet.StaticFiles": "1.0.0-beta4",
      "Microsoft.AspNet.Tooling.Razor": "1.0.0-beta4",
      "Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4",
      "Microsoft.Framework.ConfigurationModel.UserSecrets": "1.0.0-beta4",
      "Microsoft.Framework.CodeGenerators.Mvc": "1.0.0-beta4",
      "Microsoft.Framework.Logging": "1.0.0-beta4",
      "Microsoft.Framework.Logging.Console": "1.0.0-beta4",
      "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-beta4"
    },
  
    "commands": {
      "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5000",
      "gen": "Microsoft.Framework.CodeGeneration",
      "ef":  "EntityFramework.Commands"
    },
  
    "frameworks": {
      "dnx451": { },
      "dnxcore50": { }
    },
  
    "exclude": [
      "wwwroot",
      "node_modules",
      "bower_components"
    ],
    "publishExclude": [
      "node_modules",
      "bower_components",
      "**.xproj",
      "**.user",
      "**.vspscc"
    ],
    "scripts": {
      "postrestore": [ "npm install", "bower install" ],
      "prepare": [ "gulp copy" ]
    }
  }
  </code></pre>
  
  <p>When I run a dnvm list command:</p>
  
  <pre><code>&gt; dnvm list
  
  Active Version              Runtime Architecture Location                     Alias
  ------ -------              ------- ------------ --------                     -----
         1.0.0-beta4          clr     x64          &lt;mypath&gt;\.dnx\packages
         1.0.0-beta4          clr     x86          &lt;mypath&gt;\.dnx\packages
         1.0.0-beta4          coreclr x64          &lt;mypath&gt;\.dnx\packages
         1.0.0-beta4          coreclr x86          &lt;mypath&gt;\.dnx\packages
         1.0.0-beta5-11596    clr     x86          &lt;mypath&gt;\.dnx\packages 
    *    1.0.0-beta5-11624    clr     x86          &lt;mypath&gt;\.dnx\packages       default
  </code></pre>
  
  <p>I tried to use as well the 1.0.0-beta5-11596 and the 1.0.0-beta4 clr but I get the same result.</p>
  
  <p>Any idea?</p>
  
  <p>Thanks.</p>