title: Couldn't determine an appropriate version of runtime to run
body: <p>I just finished upgrading to beta4. My code compiles successfully with no errors/warnings but I am unable to launch my web api hosted in IIS Express (by hitting <code>F5</code>). I get the following error:</p>
  
  <blockquote>
    <p><strong>Couldn't determine an appropriate version of runtime to run.</strong> See
    <a href="http://go.microsoft.com/fwlink/?LinkId=517742" rel="nofollow">http://go.microsoft.com/fwlink/?LinkId=517742</a> for more information.</p>
    
    <p>Description: An unhandled exception occurred during the execution of
    the current web request. Please review the stack trace for more
    information about the error and where it originated in the code.</p>
    
    <p>Exception Details: System.InvalidOperationException: Couldn't
    determine an appropriate version of runtime to run. See
    <a href="http://go.microsoft.com/fwlink/?LinkId=517742" rel="nofollow">http://go.microsoft.com/fwlink/?LinkId=517742</a> for more information.</p>
    
    <p>Source Error:</p>
    
    <p>An unhandled exception was generated during the execution of the
    current web request. Information regarding the origin and location of
    the exception can be identified using the exception stack trace below.</p>
    
    <p>Stack Trace:</p>
    
    <p>[InvalidOperationException: Couldn't determine an appropriate version
    of runtime to run. See <a href="http://go.microsoft.com/fwlink/?LinkId=517742" rel="nofollow">http://go.microsoft.com/fwlink/?LinkId=517742</a>
    for more information.]
    System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags
    hostingFlags, PolicyLevel policyLevel, Exception
    appDomainCreationException) +303</p>
    
    <p>[HttpException (0x80004005): Couldn't determine an appropriate version
    of runtime to run. See <a href="http://go.microsoft.com/fwlink/?LinkId=517742" rel="nofollow">http://go.microsoft.com/fwlink/?LinkId=517742</a>
    for more information.]
    System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9940016
    System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)
    +101 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
    wr, HttpContext context) +261</p>
    
    <p>Version Information: Microsoft .NET Framework Version:4.0.30319;
    ASP.NET Version:4.6.57.0</p>
  </blockquote>
  
  <p>Here is the output from <code>dnvm list</code>:</p>
  
  <blockquote>
    <p>C:\src\web-api-skeleton [master]> dnvm list</p>
    
    <p>Active Version Runtime Architecture Location Alias</p>
    
    <hr>
    
    <ul>
    <li>1.0.0-beta4 clr x64 C:\Users\dpeden.dnx\runtimes default<br>
    1.0.0-beta4 clr x86 C:\Users\dpeden.dnx\runtimes<br>
    1.0.0-beta4 coreclr x64 C:\Users\dpeden.dnx\runtimes<br>
    1.0.0-beta4 coreclr x86 C:\Users\dpeden.dnx\runtimes<br>
    1.0.0-beta4-11566 clr x86 C:\Users\dpeden.dnx\runtimes  </li>
    </ul>
  </blockquote>
  
  <p>I have also tried explicitly setting the runtime (<code>Use Specific Runtime</code> on the Debug tab of the project properties) which appears not to have any effect.</p>
  
  <p>I did not have this issue prior to upgrading to VS 2015 RC and beta4 from VS 2015 CTP 6 and beta3.</p>
  
  <p>How do I resolve it?</p>
  
  <p>Thanks.</p>
  
  <p><a href="http://forums.asp.net/post/5904227.aspx" rel="nofollow">Cross reference on ASP.NET Forums</a></p>