NtfsLib
NtfsLib copied to clipboard
Cannot Run TestApplication and Failed Unit Tests ("Invalid Drive Name" and "Sequence contains no matching element")
Hi, I am trying to run TestApplication. I changed the first line from const char driveLetter = 'E'
to const char driveLetter='C'
, and get this error while running:
Exception thrown: 'System.ArgumentException' in RawDiskLib.dll
An unhandled exception of type 'System.ArgumentException' occurred in RawDiskLib.dll
Invalid diskName: \\.\C:
Also, both NTFSDirectoryTests (3) and NTFSFileTests(3) failed because of the same exception at the line RawDisk disk = new RawDisk(driveLetter);
.
Thanks!
Solved. Run VS with Admin privilege and this problem will go away.
However the TestApplication
and unit tests still cannot proceed, for unit tests it ran into exception System.InvalidOperationException: Sequence contains no matching element
.