Skip to content

Beta7: System.InvalidOperationException: No service for type 'Microsoft.Framework.Runtime.IApplicationEnvironment' has been registered. #894

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
martinalderson opened this issue Sep 5, 2015 · 9 comments

Comments

@martinalderson
Copy link

After upgrading to beta7 the web [without membership provider] same doesn't work when I run dnx kestrel on OS X. Switching back to beta6 does work. The console app example does work under beta7.

@martinalderson
Copy link
Author

Same with the membership provider too.

@davidfowl
Copy link
Member

Look at your project.lock.json to see what versions are being used. Look at what version of the dnx is being used.

@martinalderson
Copy link
Author

"DNX,Version=v4.5.1": {
  "Kestrel/1.0.0-beta6": {

@davidfowl
Copy link
Member

There ya go. So you're running Kestrel beta7 with beta7 dnx right? I'll help you out:

aspnet/Announcements#53

@martinalderson
Copy link
Author

Sure. Does this mean the yo aspnet generator needs updated too? Should I raise the issue there?

@davidfowl
Copy link
Member

Sure cc @sayedihashimi

@martinalderson
Copy link
Author

Cool. It may be worth adding a notice on the aspnet site because people are going to be confused when it doesn't work when they follow the docs until yo aspnet is upgraded.

@davidfowl
Copy link
Member

@martinalderson It's stated in the beta7 blog post. There's a direct link to all announcements and breaking changes for beta7.

@sayedihashimi
Copy link
Member

yo aspnet has already been updated for beta7. Update the generator-aspnet npm package.

natemcmaster pushed a commit that referenced this issue Nov 20, 2018
- Renamed the type to IHostedService and added Start and Stop.
- Split up the IHostedService execution and IApplicationLifetime to avoid
circular references
- Trigger IHostedService.Start after starting the server
- Trigger IHostedService.Stop before disposing the service provider

#895 #894
@ghost ghost locked as resolved and limited conversation to collaborators Dec 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants