Skip to content

Desktop MSBuild doesn't always close all of its streams #5387

Open

Description

Steps to reproduce

Clone https://github.com/wixtoolset/Tools, and run appveyor.cmd. The issue started happening in wixtoolset/Tools@ba0069b. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions