If I call System.IO.File.Delete() and pass it a directory path instead of file path I get UnathorizedAccessException with text "Access to the path <path> is denied.". This is seriously misleading because it implies I have some problems with permissions while the real problem is that the path identifies a directory and not a file.It should be something like an InvalidOperationException and the text should be something like "Path <path> is a directory, file path required."
Visual Studio/Team Foundation Server/.NET Framework Tooling Version
Steps to reproduce
Operating System Language