【发布时间】:2017-11-20 15:02:47
【问题描述】:
当我尝试在 Visual Studio 2013 上调试应用程序时引发此错误。
这是堆栈跟踪。
[UnauthorizedAccessException:对路径“D:\Chart\ASPNET CanvasJS Chart Samples\ASPNET MVC Samples\bin\roslyn\csc.exe”的访问被拒绝。] System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +11794361 System.IO.FileStream.Init(字符串路径,FileMode 模式,FileAccess 访问,Int32 权限,Boolean useRights,FileShare 共享,Int32 bufferSize,FileOptions 选项,SECURITY_ATTRIBUTES secAttrs,String msgPath,Boolean bFromProxy,Boolean useLongPath,Boolean checkHost)+1326 System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +65 System.IO.File.OpenRead(字符串路径) +33
【问题讨论】:
-
似乎是一个进程阻止了该文件。您是否尝试过重新启动 Windows?
-
@derloopkat 我通过重新启动计算机解决了这个错误,然后从 rosyln 文件夹中删除 csc.exe。
标签: c# visual-studio