Skip to content

Use cross-platform code to update apphost win32 resources, open apphost only once for writing #3828

Closed
@nguerrera

Description

@nguerrera

On dotnet/core-setup#6831, it was noted that there now exists some portable code somewhere to update win32 resources, but we are still updating using Win32 API.

The downsides of using the win32 API are:

  1. Prevents cross-compilation of apphost. You have to be on a windows build machine to build a windows apphost executable. Even a Windows Nano server is not up to the task.

  2. Prevents something like Anti-Virus, sneaking in between different opens of the apphost. We currently open it once to patch in the app name over the placeholder, and again to patch the win32 resources. This should be done with a single open.

Various attempts have been made to get around the anti-virus (or anti-virus-like) issues with retries, but we are seeing that is insufficient with multiple users still running into issues regularly.

See https://github.com/dotnet/cli/issues/11650#issuecomment-549478350

cc @swaroop-sridhar @jeffschwMSFT @peterhuene @davidwrighton

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-HostModelMicrosoft.NET.HostModel issues

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions