Fix publish error on Build.Server.Log

When the optimization data isn't available our build will terminate
with VBCSCompiler still being alive and holding a handle to
Build.Server.Log. That handle causes an error during publishing.

This error shouldn't happen as the file is open with
`FileShare.ReadWrite` hence publish can access the file. This can be
demonstrated locally by using any number of tools to open the file while
a build is running. Likely publish is looking for exclusive access here
and that's why the error occurs.

In any case though we should be killing our spawned processes at the end
of the job anyways in CI. Leaving behind server processes for the next
run is just asking for trouble.

https://github.com/Microsoft/azure-pipelines-tasks/issues/9994
上级 ed576ba3
......@@ -626,5 +626,8 @@ catch {
ExitWithExitCode 1
}
finally {
if ($ci) {
Stop-Processes
}
Pop-Location
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册