-
Notifications
You must be signed in to change notification settings - Fork 25.3k
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
BuildWebHost is unavailable #7298
Comments
Hello @gjaryczewski ... We're still in progress on getting these references updated on #6091 and #5495. We'll get to this asap. |
@Rick-Anderson, this one didn't make the cut for work on #6562. I was initially under the impression we hadn't worked the RP tutorial yet. I better leave this open until you have a chance to take a look. If you want me to catch it in my final sweep of topics later on #6091, let's close this, and I'll work it on #6091. |
The above code in program.cs leads to the error: |
When will this part of the tutorial will be updated to .NET CORE 2.1? I'm stuck at this part and i can't get progress. I've changed CreateWebHostBuilder(args).Build().Run(); to var host = CreateWebHostBuilder(args).Build(); but even then there is no chance to make var scope = host.Services.CreateScope(); because the method doesn't exist. Instead there is a method called GetService(), but at that point i don't get any clue how to step further. Debugging don't show any variables, even my breakpoint is simply ignored (or perhaps never reached, i really don't know) Even if you don't update the tutorial, can you please describe in the comments, how to implement the SeedData-class in the startup-process?` Thx. |
Humpf.... Now there is CreateScope(). I don't know what i've done wrong. Sorry... |
Just a last comment: using Microsoft.Extensions.DepencyInjection; That was my missing part. Sorry @ALL... I'll promise to read more carefully in the future... |
Just in passing, the seeding approach is a change in progress. For an example, see this remark ... #9205 (comment) The issues where the work is occurring can be found by searching the repo issues: https://github.com/aspnet/Docs/issues?q=is%3Aissue+seed+is%3Aopen I think some of the closed issues may indicate where some of the topics use the new approach. All of the topic samples will eventually use the new approach. I think the remaining topics will get attention after 2.2 comes out, and that's tentatively scheduled to happen by year's end. |
With SDK 2.1, it looks like BuildWebHost(args) should be replaced by CreateWebHostBuilder(args).Build().
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: