4

I have an ASP.NET 5 Beta 7 Application and it uses MVC but even when I comment everything out the appication throws this error. It worked fine one day and started displying this error the next. Any help or even pointers on where to look would be appriciated.

[InvalidOperationException: Failed to resolve IRuntimeEnvironment]
   System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +303

[HttpException (0x80004005): Failed to resolve IRuntimeEnvironment]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9924184
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +261

Thank you!

Lukasz
  • 8,710
  • 12
  • 44
  • 72

1 Answers1

0

You probably ran the following command and got a new runtime:

dnvm update-self

Run the following command to set the runtime back to beta7 (even though it's outdated now)

dnvm use 1.0.0-beta7 -r clr -arch x86 -p

now you should be able to run

dnu restore
dnu build
dnx web
Ajden Towfeek
  • 387
  • 2
  • 14