Use apphost.exe for app-base application activations
This is a port of the CLI issue: https://github.com/dotnet/cli/issues/3850
Milestone: .NET Core 2.0
Steps to reproduce
dotnet new
# Edit project manifest to be standalone
dotnet build
dotnet publish
Expected behavior
- The executable should instead instead be apphost.exe
- Replace the below string bytes in apphost.exe to
"appname.dll\0", (this can be done in managed code as well)
c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2
Sample code that replaces the string is present in this commit: dotnet/core-setup@b391644
Actual behavior
The binary executable is dotnet.exe host.
Environment data
dotnet --info output:
After PR https://github.com/dotnet/core-setup/pull/711 goes in, for standalone applications apphost.exe needs to be used instead of dotnet.exe. Sample code that replaces the string is present in this commit: https://github.com/dotnet/core-setup/pull/711/commits/b391644b5832dbd507ee2a97c24ffb9fe4aca3cd
Cc @gkhanna79 @piotrpMSFT @livarcocc @nguerrera @dsplaisted
When doing so, I would suggest that the SDK be backwards compatible. Something along the lines of: if dotnet.exe is present, then use dotnet.exe. When absent, look for apphost.exe and use that as the host for standalone apps. This is because when https://github.com/dotnet/core-setup/issues/217 is fixed, dotnet.exe will no longer be present in the Microsoft.NETCore.App's closure.
@ramarag I take it this is complete with your recent feature work?
C @eerhardt
fixed by https://github.com/dotnet/sdk/pull/978
we first look for apphost.exe and if we do not find it, we default to dotnet.exe