Skip to content
This repository has been archived by the owner on Nov 28, 2021. It is now read-only.

Cannot Run TestApplication and Failed Unit Tests ("Invalid Drive Name" and "Sequence contains no matching element") #3

Open
chaojian-zhang opened this issue Aug 14, 2019 · 1 comment

Comments

@chaojian-zhang
Copy link

chaojian-zhang commented Aug 14, 2019

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!

@chaojian-zhang
Copy link
Author

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.

@chaojian-zhang chaojian-zhang changed the title Invalid Drive Name Cannot Run TestApplication and Failed Unit Tests ("Invalid Drive Name" and "Sequence contains no matching element") Aug 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant