No service for type 'Microsoft.Framework.Runtime.ILibraryManager' has been registered.
Hi guys,
I'm currently exploring the new version of ASP.NET, and I can't get this issue fixed...
When I run an empty ASP.NET 5 project it throws the following error:
Server Error in '/' Application.
No service for type 'Microsoft.Framework.Runtime.ILibraryManager' has been registered.
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.
Exception Details: System.InvalidOperationException: No service for type 'Microsoft.Framework.Runtime.ILibraryManager' has been registered.
Source Error:
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.
Stack Trace:
[InvalidOperationException: No service for type 'Microsoft.Framework.Runtime.ILibraryManager' has been registered.] System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +303
[HttpException (0x80004005): No service for type 'Microsoft.Framework.Runtime.ILibraryManager' has been registered.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9940016 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +261
My project is just the default generated code, nothing more.
I'm using the 1.0.0-beta5 clr x64 on windows 8.1.
Thanks!
This looks like a duplicate of this SO question.
@TomGroeneboer can you please share the project.json file?
I've got the problem, some dependencies in project.json weren't beta5, which I think is weird. The generated code from VS should just work out of the box, right?
We actually have a bug with that. Visual studio will always use the beta5 packages but it will update the DNX based on your default alias (this will be fixed in a future VS version). So if you run dnvm upgrade, whatever version you upgrade to, you'll end up using the version in visual studio. Check your global.json for the version a specific project is using.
Sorry for the pain!
Hmm, the global.json says 1.0.0-beta5 out of the box. But the dependencies aren't updated to that version. dnvm list tells me that 1.0.0-beta5 clr x86 is set as default.
Visual Studio templates are baked to a specific version of the packages and they don't update until VS updates
I see, thanks for the help guys!
Right so you need to update the packages and code manually.
It's now running! :) I'm trying to port some ASP.NET 4.5 applications to the new version of ASP.NET. A lot of things changed, now trying to understand the Middleware thing