Building .sln files within a ??? directory fails on macOS
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 133
Description
### Steps to reproduce
1. Make a `.sln` of any kind, put it in a directory named `???` on macOS.
2. `cd` into the directory, and build with either:
```
$ cd \?\?\?
$ msbuild foo.sln
$ dotnet build foo.sln
```
3. fails with:
```
/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/xbuild/Current/Microsoft.Common.props(62,3):
error MSB4019: The imported project "/Users/jopepper/Projects/???/foo/obj/foo.csproj.*.props" was not found.
Confirm that the expression in the Import declaration "/Users/jopepper/Projects/%3f%3f%3f/foo/obj/foo.csproj.*.props" is correct, and that the file exists on disk.
```
Sample (binlogs inside): [???.zip](https://github.com/microsoft/msbuild/files/4736412/default.zip)
### Expected behavior
Things work inside a directory with question marks.
### Actual behavior
It appears that question marks break a `.sln` build.
### Environment data
Since this fails under Mono & .NET Core, it probably happens on any MSBuild running on macOS.
`msbuild /version` output:
```
Microsoft (R) Build Engine version 16.6.0-ci for Mono
Copyright (C) Microsoft Corporation. All rights reserved.
16.6.0.16201
...
Microsoft (R) Build Engine version 16.7.0-preview-20270-03+bee129d1b for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
16.7.0.27003
```
OS info:
macOS Catalina 10.15.4
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure on macOS using the commands in the issue and a solution under a directory named `???`. Inspect the supplied binlogs and the import reported at `Microsoft.Common.props(62,3)` to trace how the path is transformed. Done means both `msbuild foo.sln` and `dotnet build foo.sln` succeed from that directory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, macos
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100