Publish the console host in its own nuget package
This is needed for xplat publish. dotnet/sdk#4381 discusses the scenario of publishing for all runtimes when --runtime switch is not specified by the user.
@gkhanna79 this is dependent on the outcome of our host conversations. Assigning to you until that story fleshes out a bit.
@piotrpMSFT Is this about the shared host?
@gkhanna79 yes, this is regarding shared host @schellap started a conversation about this today. I'm curious if NuGet is really the right answer... Or should these be zip files. Will they really behave like NuGets?
What is the design for cross-architecture compilation for CLI as that will influence what this shapes up to be?
@anurse, how will you be consuming the host?
@piotrpMSFT, I asked this mainly for servicing the host using the dotnet servicing methods.
I am thinking two types of servicing:
- Explicit COREHOST_LIBPATH to load custom hosts like corerun and also clihost (current host)
- Use the DOTNET_SERVICING/PackageName/PackageVersion to load a serviced host dll if 1 doesn't exist. PackageName and PackageVersion will be baked into the host at build time.
Also, ILC and other folks can start using the unified host without dependency on dotnet through the Nuget package.
These really don't sound like NuGet packages, but I am totally in favor of the idea of distributing them as versioned artifacts on a feed that is consumed by the CLI somehow. In general, I don't want to create the impression that an application takes a dependency on the host.
I think the best way to do this would be to work out how we will be packaging runtimes (which should NOT be in NuGet packages, IMHO ;)), and include the host in that package. That means that for x-plat publishing, you would use dotnet CLI commands to fetch and install a runtime package for a different platform and then dotnet-compile and dotnet-publish can use those.
I don't want to create the impression that an application takes a dependency on the host.
I agree. That said, servicing of the host is independent of how cross-compilation/publishing is going to work.
Let us use https://github.com/dotnet/cli/issues/438 to discuss how servicing of the host should work and use this to have a base package inplace for the host (something that we can do right now).
@Sridhar-MS Can you confirm you still need this issue to be addressed (i.e. need a nuget package for the universal host)?
I don't want to create the impression that an application takes a dependency on the host.
Currently, the app takes a dependency on NETStandard.Library NuGet package which brings in the runtime. We can make an entry for the host nupkg in the standard library package.
@gkhanna79, moving forward, I believe we need the nupkg for both aquisition and servicing. For now, we can assume the host would come from the dotnet CLI, but like @anurse also suggests, it should come from NETStandard.Library just like the CLR.
As far as servicing is concerned, there are two models:
- DOTNET_SERVICING location to support ASP .NET/CLI servicing models
- App local DLL copy to support a pull model by the user
- Lastly, user can themselves replace the corehost.exe as last resort from the host nupkg feed.
Cc @ericstj
We can make an entry for the host nupkg in the standard library package.
Host is an implementation detail that shouldn't be reflected in the standard library since it is not part of the library (and we shouldn't use standard library as means to deliver the host).
it should come from NETStandard.Library just like the CLR.
@anurse Can you please elaborate on why this is required?
it should come from NETStandard.Library just like the CLR.
@anurse Can you please elaborate on why this is required?
not really, since I agree with you that it should not be part of the Standard Library, neither should the CLR itself IMO. The runtime (and probably the host) should come using their own packaging mechanism.
@schellap What are the next steps on this?
@piotrpMSFT could you please move this to RTM? For RC, I am thinking about having the user pull the latest corehost from the dotnet/cli servicing drop.
This is done.
Are we happy with how this is done? Right now there is a circular dependency here (CLI repo produces package, corefx consumes it, CLI consumes corefx).