1
votes

This error is thrown when I try to debug Application on Visual Studio 2013.

Here is Stack Trace.

[UnauthorizedAccessException: Access to the path 'D:\Chart\ASPNET CanvasJS Chart Samples\ASPNET MVC Samples\bin\roslyn\csc.exe' is denied.] System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +11794361 System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, 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(String path) +33

1
Seems like a process blocking that file. Have your tried to restarting Windows?Daniel Manta
@derloopkat I solved this error by restarting the computer then delete csc.exe from rosyln folder.TAHA SULTAN TEMURI

1 Answers

0
votes

I encounter the same problem randomly and found the easiest way to get around it by:

  1. Right click the solution and go to properties
  2. Change the value of the Output path from bin\ to bin1\

now build and I hope it will work enter image description here