Description
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:
-
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.
-
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