visualstudio.xunit icon indicating copy to clipboard operation
visualstudio.xunit copied to clipboard

Directory.GetFiles(UNC Path) does not work

Open emi662002 opened this issue 6 years ago • 1 comments

using this code when executing a xunit test var baseDir ="\\\\?\\UNC\\storage\\c$\\folder"; System.IO.Directory.GetFiles(baseDir));

throws exception "illegal characters in path"

the same code running on MStest works just fine. I guess the problem is that you are using .net 4.5.2 and the "UNC feature" allowing \?\UNC\ as path prefix works only since .net 4.6.2

emi662002 avatar May 01 '20 13:05 emi662002

Current minimum version is now 4.6.2, so this should be fixed.

bradwilson avatar May 27 '23 18:05 bradwilson