sdk icon indicating copy to clipboard operation
sdk copied to clipboard

Use apphost.exe for app-base application activations

Open schellap opened this issue 9 years ago • 5 comments

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

  1. The executable should instead instead be apphost.exe
  2. 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:

schellap avatar Dec 29 '16 02:12 schellap

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

schellap avatar Dec 29 '16 02:12 schellap

Cc @gkhanna79 @piotrpMSFT @livarcocc @nguerrera @dsplaisted

schellap avatar Dec 29 '16 02:12 schellap

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.

schellap avatar Dec 29 '16 02:12 schellap

@ramarag I take it this is complete with your recent feature work?

C @eerhardt

gkhanna79 avatar Mar 22 '17 04:03 gkhanna79

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

ramarag avatar Mar 23 '17 21:03 ramarag