#line directives fail to build in worktrees (original) (raw)

Version Used: SDK 6.0.0-preview.6.21352.12

Steps to Reproduce:

  1. Clone Roslyn
  2. Create a git worktree from release/dev16.11: git worktree add ../r2 release/dev16.11 (The specific branch doesn't really matter, you just can't have a worktree with the same branch as another tree.
  3. Attempt to build via .\Restore && .\Build

Expected Behavior:

Build succeeds

Actual Behavior:

/tmp/r2/src/Scripting/CSharpTest/ObjectFormatterTests.cs(892,13): error CS1504: Source file 'z:\Fixture.cs' could not be opened -- Could not find file. [/tmp/r2/src/Scripting/CSharpTest/Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests.csproj]

Note: this has reproed for me on Linux and @jmarolf on Windows.