HostModel: Retry ResourceUpdate on Win32 File-Lock error (dotnet/core-setup#7665)
* HostModel: Retry ResourceUpdate on Win32 File-Lock error On Win32 PE files, the SDK copies resources on the AppHost binary from the intermediate assembly. This update is performed using native Win32 operations. This change retries the resource update if the operation fails because the file is locked (say because of AntiVirus scan). This change is similar to: https://github.com/dotnet/core-setup/pull/7617 which handles failures in managed code via IOException. The Retry logic is factored out to the RetryUtil class. Currently the HostWriter is the only client for the class. But it is made public because other components (like Bundler) may use it in future. Commit migrated from https://github.com/dotnet/core-setup/commit/6f3ead36128f5ef3287a847fe9f4cf0d1177a057
Showing
想要评论请 注册 或 登录