Skip to content
This repository has been archived by the owner on Dec 19, 2018. It is now read-only.

BUG: WebHostBuilder.UseEnvironment being overwritten on WebHostBuilder.Build #302

Closed
giggio opened this issue Jul 7, 2015 · 3 comments
Closed
Assignees
Milestone

Comments

@giggio
Copy link

giggio commented Jul 7, 2015

If you set the environment using WebHostBuilder.UseEnvironment and later call WebHostBuilder.Build it will initialize using HostingEnvironmentExtensions:
https://github.com/aspnet/Hosting/blob/1.0.0-beta5/src/Microsoft.AspNet.Hosting/WebHostBuilder.cs#L101
This will overwrite the setting applied with UseEnvironment, making this method useless.
Either remove the method, or rewrite the way it is working so that on Build the environment passed in by the user is used.

@Tratcher Tratcher added the bug label Jul 8, 2015
@davidfowl
Copy link
Member

@giggio Care to submit a pull request?

/cc @HaoK

@giggio
Copy link
Author

giggio commented Jul 8, 2015

@davidfowl sure. I will change it in a way that the Build method works.

@glennc glennc added this to the Backlog milestone Aug 11, 2015
@davidfowl davidfowl modified the milestones: 1.0.0-rc2, Backlog Nov 10, 2015
@davidfowl
Copy link
Member

/cc @pakrym can you take a look?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants