dotnet / dotnet/msbuild

[Bug]: MSBuild randomly(?) fails to expand globs

Open
#9,606 8 comments 1 reaction 0 assignees View on GitHub
backlog blocked bug Feature - Globbing Priority:2 triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

### Issue Description

I have a custom MSBuild SDK that builds Zig/C/C++ projects. The 'test suite' consisting of sample projects randomly fails to build on my machine because MSBuild sometimes fails to expand globs for no apparent reason.

### Steps to Reproduce

```
$ git clone https://github.com/vezel-dev/zig-sdk.git
$ cd zig-sdk
$ ./cake # In a Bash shell.
```

### Expected Behavior

Successful build.

### Actual Behavior

Errors of the general form:

```
cxxexe failed with errors (26,6s)
**/*.cxx(1,1): error G91F73F44: unable to build C object: Unexpected
```

This is the Zig compiler complaining that it's being passed the literal argument `**/*.cxx`, i.e. MSBuild has failed to expand the glob here: https://github.com/vezel-dev/zig-sdk/blob/6a48e6c8821810ba8053b91419a45ff7bfb8e41f/src/sdk/build/Vezel.Zig.Sdk.Build.props#L20-L22

### Analysis

There doesn't appear to be any particular pattern to when it happens.

### Versions & Configurations

.NET SDK 8.0.100
MSBuild 17.8.3.51904

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.