You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In aspnet/Hosting#521 we are making some updates to the Hosting and TestServer API. Main changes include:
Single entry point
Previously we had multiple entry points for web applications including in Hosting (Microsoft.AspNet.Hosting), Servers (e.g. Microsoft.AspNet.Server.Kestrel) and the the application itself (e.g. Startup.cs). We have removed the entry points in Hosting and the servers so the only entry point moving forward is from the application. This will required updates to the project.json including setting emitEntryPoint to true under compilationOptions and setting commands to point to the Startup assembly. Configuration for server selection and address configuration can be achieved through hosting.json. As an example, refer to aspnet/Diagnostics@c476f91 for updates required after this change.
Renames
-WebHostBuilder has been renamed to WebApplicationBuilder and will now build an IWebapplication.
-WebHostOptions has been renamed to WebApplicationOptions
-IApplication and IHostingEngine have been merged to become IWebApplication as have the classes that implement them. Note that Start() will no longer return an IApplication but will still return an IDisposable for handling shutdown.
-The old WebApplication has split into WebApplicationConfiguration from where the default Hosting configurations can be created and WebApplicationExtensions which contains the extension method for running IWebApplications
TestServer TestServer will no longer have overloaded methods for Create. All configurations should be done using a WebApplicationBuilder which is passed to the constructor of TestServer.
Startup assembly name
Previously, when no startup is specified, we default to using the current assembly when nothing is specified. This has been removed so now an explicit Startup must be specified through WebApplication.Configure(...), WebApplication.UseStartup(...) or through hosting.json.
Namespace updates ApplicationLifetime, HostingEnvironment and HostingEnvironmentExtensions have moved to the Micrsoft.AspNet.Hosting.Internal namespace.
In aspnet/Hosting#521 we are making some updates to the Hosting and TestServer API. Main changes include:
Previously we had multiple entry points for web applications including in Hosting (
Microsoft.AspNet.Hosting
), Servers (e.g.Microsoft.AspNet.Server.Kestrel
) and the the application itself (e.g.Startup.cs
). We have removed the entry points in Hosting and the servers so the only entry point moving forward is from the application. This will required updates to theproject.json
including settingemitEntryPoint
to true undercompilationOptions
and settingcommands
to point to the Startup assembly. Configuration for server selection and address configuration can be achieved throughhosting.json
. As an example, refer to aspnet/Diagnostics@c476f91 for updates required after this change.-
WebHostBuilder
has been renamed toWebApplicationBuilder
and will now build anIWebapplication
.-
WebHostOptions
has been renamed toWebApplicationOptions
-
IApplication
andIHostingEngine
have been merged to becomeIWebApplication
as have the classes that implement them. Note thatStart()
will no longer return anIApplication
but will still return anIDisposable
for handling shutdown.-The old
WebApplication
has split intoWebApplicationConfiguration
from where the default Hosting configurations can be created andWebApplicationExtensions
which contains the extension method for runningIWebApplications
TestServer
will no longer have overloaded methods forCreate
. All configurations should be done using aWebApplicationBuilder
which is passed to the constructor ofTestServer
.Previously, when no startup is specified, we default to using the current assembly when nothing is specified. This has been removed so now an explicit Startup must be specified through
WebApplication.Configure(...)
,WebApplication.UseStartup(...)
or throughhosting.json
.ApplicationLifetime
,HostingEnvironment
andHostingEnvironmentExtensions
have moved to theMicrsoft.AspNet.Hosting.Internal
namespace.Samples of the usage of the new API can be found in https://github.com/aspnet/Hosting/tree/dev/samples/SampleStartups
Please use aspnet/Hosting#525 for discussion.
The text was updated successfully, but these errors were encountered: