Results 1 to 4 of 4

Thread: File cannot be copied to the run directory

  1. #1
    Join Date
    Jun 2009
    Posts
    83

    File cannot be copied to the run directory

    The file 'DDSControls.dll' cannot be copied to the run directory. Access is denied
    I got this error when I was trying to compile a web project. The requested operation failed because it is being used by another process. I am using Visual Studio. Any idea why this error message means?

  2. #2
    Join Date
    Jan 2008
    Posts
    1,521

    Re: File cannot be copied to the run directory

    This error occurs due to one of the following reasons:
    • A reference that has the CopyLocal property set to true could not be copied to the directory from which the project is being run.
    • A dependency of a reference with a CopyLocal property set to true could not be copied to the directory from which the project is being run.
    • Any other file that needed to be copied locally cannot be copied to the directory from which the project is being run.


    To solve this error:
    • Check your computer's available disk space
    • Check whether you are hitting the MAX_PATH limit imposed by the file system

  3. #3
    Join Date
    Nov 2008
    Posts
    1,221

    Re: File cannot be copied to the run directory

    This problem may occur when one of the assemblies that you compile is larger than 64 KB and one or both of the following conditions is true:
    • Your solution contains projects that are compiled to the same output folder.
    • The Copy Local property on one of the referenced assemblies or projects is set to False.


    To work around this problem, do any (or all) of the following, as appropriate for your projects:
    • Compile the outputs for individual projects to different folders. Visual Studio .NET 2002 and Visual Studio .NET 2003 do not support a common output folder.
    • Set the Copy Local property for the referenced assembly or project to True.
    • Verify that you do not have the Object Browser window open.
    • Verify that you do not have the same project (or projects) open in another instance of Visual Studio .NET.

  4. #4
    Join Date
    Apr 2008
    Posts
    1,948

    Re: File cannot be copied to the run directory

    Simply follow the below steps:

    1. Open the solution that references the assembly.
    2. In Solution Explorer, locate the project that references the assembly.
    3. Click the References node of the project.
    4. Right-click the assembly reference, and then click Properties.
    5. Set the Copy Local property to True:
    6. Save the solution.

    If the above method doesn't work then, I would suggest that you to upgrade your Visual Studio to 2008 edition.

Similar Threads

  1. Replies: 5
    Last Post: 05-11-2010, 12:04 AM
  2. Windows Batch file to output directory names and size to txt file
    By m2thearkus in forum Software Development
    Replies: 6
    Last Post: 16-07-2010, 12:04 AM
  3. Replies: 2
    Last Post: 17-08-2009, 08:21 AM
  4. Bad interpreter: no such file or directory
    By MobiNuX in forum Operating Systems
    Replies: 3
    Last Post: 29-07-2009, 10:57 PM
  5. Recovering orphaned file into directory file
    By Seraphim in forum Operating Systems
    Replies: 3
    Last Post: 26-05-2009, 11:21 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,931,528.05857 seconds with 16 queries