dotnet / dotnet/msbuild

Desktop MSBuild doesn't always close all of its streams

Open
#5,387 2 comments 0 reactions 0 assignees View on GitHub
triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

### Steps to reproduce

Clone https://github.com/wixtoolset/Tools, and run `appveyor.cmd`. The issue started happening in https://github.com/wixtoolset/Tools/commit/ba0069bf9572d26a9deac77bac3613bc2f96e01a. The issue was worked around in the next commit by disabling node reuse.

Specifically, the tests in WixToolsetTest.MSBuild hang (`dotnet test -c Release src\test\WixToolsetTest.MSBuild`). You have to run the whole script in order to run those tests. The tests do not hang when run inside of Visual Studio.

### Expected behavior

Whenever `msbuild.exe` is launched by the user, it closes its output and error streams before exiting so that the user can capture all of its output and know the process has completed.

### Actual behavior

The `msbuild.exe` does not close its output and error streams before exiting, causing our tests to hang since they are waiting for the streams to close.

### Environment data
`msbuild /version` output:

Microsoft (R) Build Engine version 16.5.0+d4cbfca49 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

16.5.0.12403

OS info:

Windows 10 Version 10.0.18363

If applicable, version of the tool that invokes MSBuild (Visual Studio, dotnet CLI, etc):

https://github.com/wixtoolset/WixBuildTools/blob/223b2845955d4d6604cfd014cf9aa536ca1eb0a2/src/WixBuildTools.TestSupport/ExternalExecutable.cs

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.