Skip to content
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

Closed
gjaryczewski opened this issue Jun 26, 2018 — with docs.microsoft.com · 7 comments
Closed

BuildWebHost is unavailable #7298

gjaryczewski opened this issue Jun 26, 2018 — with docs.microsoft.com · 7 comments
Labels
Pri1 Pri2 Source - Docs.ms Docs Customer feedback via GitHub Issue
Milestone

Comments

Copy link

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.

@guardrex
Copy link
Collaborator

Hello @gjaryczewski ... We're still in progress on getting these references updated on #6091 and #5495. We'll get to this asap.

@guardrex guardrex added Source - Docs.ms Docs Customer feedback via GitHub Issue Duplicate labels Jun 26, 2018
@guardrex
Copy link
Collaborator

@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.

Copy link

The above code in program.cs leads to the error:
InvalidProgramException: Vararg calling convention not supported.

Copy link

rldml commented Nov 21, 2018

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();
host.Run();

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.

Copy link

rldml commented Nov 21, 2018

Humpf....

Now there is CreateScope(). I don't know what i've done wrong.

Sorry...

Copy link

rldml commented Nov 21, 2018

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...

@guardrex
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pri1 Pri2 Source - Docs.ms Docs Customer feedback via GitHub Issue
Projects
None yet
Development

No branches or pull requests

5 participants