Causes errors like this, notice the file path:
System.IO.FileNotFoundException
HResult=0x80070002
Message=Could not find file 'C:\Projects\GitHub\Microsoft\python-language-server\output\bin\Debug\PythonApplication7.py'.
Source=System.Private.CoreLib
StackTrace:
at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.IO.File.Open(String path, FileMode mode, FileAccess access, FileShare share)
at Microsoft.Python.Core.IO.FileSystem.FileOpen(String path, FileMode mode, FileAccess access, FileShare share) in C:\Projects\GitHub\Microsoft\python-language-server\src\Core\Impl\IO\FileSystem.cs:line 35
See how my _workspaceRootPath is properly set, and also the cwd which I've added FYI.

And now the result, which is incorrectly rooted:

Problem seems to be in DirectoryInfoProxy class:
public IEnumerable<IFileSystemInfo> EnumerateFileSystemInfos(string[] includePatterns, string[] excludePatterns) {
var matcher = GetMatcher(includePatterns, excludePatterns);
PatternMatchingResult matchResult = SafeExecuteMatcher(matcher);
return matchResult.Files.Select((filePatternMatch) => {
var path = PathUtils.NormalizePath(filePatternMatch.Path);
return CreateFileSystemInfoProxy(new FileInfo(path));
});
}
The FileInfo is created with just the file name.
If I change that line to this, it works fine:
return CreateFileSystemInfoProxy(new FileInfo(Path.Combine(_directoryInfo.FullName, path)));