aspnetcore: FileSystemGlobbing passes invalid path upon upgrade to Core 2.0

From @JeremyKuhne on Monday, November 6, 2017 9:57:21 AM

From https://github.com/dotnet/home/issues/88 opened by @HarelM:

An unhandled exception of type 'System.ArgumentException' occurred in System.Private.CoreLib.dll
The path is not of a legal form.

System.Private.CoreLib.dll!System.IO.Path.GetFullPath(string path)	Unknown	No symbols loaded.
 	Microsoft.Extensions.FileSystemGlobbing.dll!Microsoft.Extensions.FileSystemGlobbing.InMemoryDirectoryInfo.InMemoryDirectoryInfo(string rootDir, System.Collections.Generic.IEnumerable<string> files, bool normalized)	Unknown	No symbols loaded.
 	Microsoft.Extensions.FileSystemGlobbing.dll!Microsoft.Extensions.FileSystemGlobbing.MatcherExtensions.Match(Microsoft.Extensions.FileSystemGlobbing.Matcher matcher, string rootDir, System.Collections.Generic.IEnumerable<string> files)	Unknown	No symbols loaded.
 	Microsoft.Extensions.FileSystemGlobbing.dll!Microsoft.Extensions.FileSystemGlobbing.MatcherExtensions.Match(Microsoft.Extensions.FileSystemGlobbing.Matcher matcher, string file)	Unknown	No symbols loaded.
 	Microsoft.Extensions.FileProviders.Physical.dll!Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.ReportChangeForMatchedEntries(string path)	Unknown	No symbols loaded.
 	Microsoft.Extensions.FileProviders.Physical.dll!Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.OnFileSystemEntryChange(string fullPath)	Unknown	No symbols loaded.
 	Microsoft.Extensions.FileProviders.Physical.dll!Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.OnRenamed(object sender, System.IO.RenamedEventArgs e)	Unknown	No symbols loaded.
 	System.IO.FileSystem.Watcher.dll!System.IO.FileSystemWatcher.NotifyRenameEventArgs(System.IO.WatcherChangeTypes action, string name, string oldName)	Unknown	No symbols loaded.
 	System.IO.FileSystem.Watcher.dll!System.IO.FileSystemWatcher.ParseEventBufferAndNotifyForEach(byte[] buffer)	Unknown	No symbols loaded.
 	System.IO.FileSystem.Watcher.dll!System.IO.FileSystemWatcher.ReadDirectoryChangesCallback(uint errorCode, uint numBytes, System.Threading.NativeOverlapped* overlappedPointer)	Unknown	No symbols loaded.
 	System.Private.CoreLib.dll!System.Threading._IOCompletionCallback.PerformIOCompletionCallback(uint errorCode, uint numBytes, System.Threading.NativeOverlapped* pOVERLAP)	Unknown	No symbols loaded.

More details are in the source issue. His site is here:

This is the relevant repository snapshot as I’m planning to check-in the downgrade to 1.1 later tonight. https://github.com/IsraelHikingMap/Site/tree/fb4e06310e1c5135f446ded685ee548c7e948e28

Note that we (CoreFX) have not made any changes in System.IO from 1.1 to 2.0 that are in this code path.

Copied from original issue: aspnet/FileSystem#299

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 24 (8 by maintainers)

Commits related to this issue

Most upvoted comments

We have a candidate fix available on a nightly feed. If you would like to try it out, follow these steps:

  1. Add a NuGet.config file to your solution and with this patch feed:
<configuration>
  <packageSources>
    <add key="aspnetcore-test-feed" value="https://dotnet.myget.org/F/aspnet-2018-feb-patch-public/api/v3/index.json" />
  </packageSources>
</configuration>
  1. Update your MSBuild project (*.csproj file) to include a reference to the patched component, Microsoft.Extensions.FileProviders.Physical
<ItemGroup>
  <PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="2.0.1-rtm-215" />
</ItemGroup>
  1. Dotnet restore and re-build your project.

Please let me know ASAP if this does not fix the issue or causes a regression of any kind. We’re preparing to release this fix to NuGet.org soon.