none
Unable to copy file "obj\Debug\<dll> to "bin\Debug\<dll>. Could not find file 'obj\Debug\<dll>'.

    Question

  • Hi;

    This is driving me nuts;

    I have seen some other similar posts, but none with "Could not find file" reason....

    Any time I edit any object in the assembly, I get the above error when attempting to run the assembly in debug mode.

    If I then build the assembly from the Build menu, the build is always succesful, and I can then run the assembly, until such point of time I edit another object, and we start all over again.

    Any help would be greatly appreciated.

    Kindest Regards

    Dave

    Friday, July 09, 2010 10:42 AM

Answers

  • Hello Dave,

    I read through all the thread and suspect that this is project or solution specific issue.

    In order to narrow down it, please do the following tests:

    1. Create a new solution and an empty new Class Library project. Check if you can repro the issue.

    2. Add Modao.Parser into the new solution and check if you can repro the issue.

    3. Add Modao.SQL into the new solution and check repro.

    ...

    4. Add Modao.SQL.Reports.Designer into the new solution and check repro.

    Until you find the project which triggers the repro. Please recreate the project by creating a new project with same type and add code files in it.

    Please let me know if it works for you. Thanks.


    Looking for TFS Hot Issues? Follow us at Twitter.

    Hongye Sun [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by modao Wednesday, August 04, 2010 6:00 PM
    Wednesday, July 28, 2010 1:56 AM
  • Hi Hongye / Chao;

    I have spent quite some time revising both the working copy and VSS copies of my solution.  There were several inconcistencies found between the VSS location and working folders location of projects in the solution.

    In addition, I also noticed that tow projects i.e. Modao.SQL.Reports.Manager and Modao.SQL.Reports.Barcode were both loaded in VSS, yet (strangely enough) marked as not being under source control in the IDE.  This is depite the fact that the projects contained binding files.  (These were the same two projects that were being reported in the error. 

    I note that he VSS copies of the two projects were not up-to-date.

    Consequently I:

    1. Deleted the VSS copies
    2. Deleted the binding files from the working copies of the affected projects
    3. Removed the bindings when prompted
    4. Deleted the solution files for the offending projects
    5. Recreated the solutions
    6. Re-added the solutions to VSS

    "Touch Wood", after a couple of days all seams to be fine.

    Conclusion
    Something got way screwed up between the solution files and the VSS bindings for the solution and it's projects, whether it be corruption in the solution file or corruption in the project binding files.

    Rebuilding the solution has seemed to solve the problem.

    I sincerely thank you for you and Chao for your dedication and advice.

    Kind Regards

    Dave

     

    • Marked as answer by modao Wednesday, August 04, 2010 6:00 PM
    Wednesday, August 04, 2010 5:59 PM

All replies

  • Hello, Dave

    I have never met this odd issue. You mentioned the error is Unable to copy file "obj\Debug\<dll> to "bin\Debug\<dll>. Could not find file 'obj\Debug\<dll>'. Could you tell me that whether your dll exists in obj\Debug folder before you click build?

    Could you check “Tools”->”Options”->”Project And Solutions”->“Build and Run”, and check the “On Run, when projects are out of date” dropdown list?

    Is there any dependency in your solution?

    Could you provide me essential information for me to reproduce this odd issue?

    I am looking forward to hear from you.

    Thanks

    Monday, July 12, 2010 11:51 AM
  • Hello, Dave

    Any feed back? I need your clarification, Plz.

    Thanks

    chao

    Tuesday, July 13, 2010 8:18 AM
  • Hi Chao;

    Sorry for the delay, however I have been having troubles recieveing MSFT email notifications, despite the fact that they are white listed.  In relation to the problem:

    1). The dependency heirarchy is as follows:

    Modao
      Modao.Parser
      Modao.SQL
        Modao.SQL.Reports.Manager
          Modao.SQL.Reports.Designer

    It is the Modao.SQL.Reports.Manager that is referenced in the error message and it is the Modao.SQL.Reports.Designer (start-up) exe that is being debugged.

    2).  I can confirm the following:

        a). The "On-Run, when projects are out of date" option is set to "Always Build"
        b). The build sequence is correct and in the order above.
        c). There is no circular dependency between manager and designer

    3). I have just done some testing and here is the interesting point.  Before running the debug session, the Modao.SQL.Reports.Manager dll does exist in the obj\debug directory, however once the error is recieved, the dll is missing from the directory.

    Once I run "Build" from the menu the manager dll is then re-created and the next "F5" debug session will run correctly.

    Please note that to re-create the Modao.SQL.Reports.Manager dll, I am building the Designer project, not the Manager project or the solution.  (Is this strange or normal behaviour?)

    FYI: I dont know if this is relevant at all however, the designer application is a report designer utilizing several DesignSurface objects and the DesignSurfaceManager.

    At this point, I dont' know what other "Essential" information I could provide as I am ompletely baffled by this issue. 

    Before this post, I did an extensive net & MSDN  search and did not come up with any previous issue that matches the error description.  I can only assume that this is potentially an MSBuild issue which has not previously been encountered.

    My problem of course is that the projects are both complex and propietory, so I dont really know where we go from here to try to resolve the issue.

    Kind regards

    Dave

    Wednesday, July 14, 2010 11:56 AM
  • Additional New Information

    Hi again Chao;

    Subsequent to my last post, I today added a new project to the solution i.e. Modao.Barcode

    Since I added this project:

    1. The <dll> in the error message now always relates to Modao.Barcode (not Modao.SQL.Reports.Manager)
    2. The only way I can get rid of the error is to a) Clean the Solution, then b) Rebuild the entire solution.  (no other combination works)

    It appears that the error is occuring in relation to the last solution that was added to the project, as prior to addin this proeject, Modao.SQL.Reports.Manager was previously the last solution to be added to the project.

    Hope this helps.

    Kind Regards

    Dave

    Saturday, July 17, 2010 4:01 PM
  • Hello Dave,

    I read through all the thread and suspect that this is project or solution specific issue.

    In order to narrow down it, please do the following tests:

    1. Create a new solution and an empty new Class Library project. Check if you can repro the issue.

    2. Add Modao.Parser into the new solution and check if you can repro the issue.

    3. Add Modao.SQL into the new solution and check repro.

    ...

    4. Add Modao.SQL.Reports.Designer into the new solution and check repro.

    Until you find the project which triggers the repro. Please recreate the project by creating a new project with same type and add code files in it.

    Please let me know if it works for you. Thanks.


    Looking for TFS Hot Issues? Follow us at Twitter.

    Hongye Sun [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by modao Wednesday, August 04, 2010 6:00 PM
    Wednesday, July 28, 2010 1:56 AM
  • Hi Hongye / Chao;

    I have spent quite some time revising both the working copy and VSS copies of my solution.  There were several inconcistencies found between the VSS location and working folders location of projects in the solution.

    In addition, I also noticed that tow projects i.e. Modao.SQL.Reports.Manager and Modao.SQL.Reports.Barcode were both loaded in VSS, yet (strangely enough) marked as not being under source control in the IDE.  This is depite the fact that the projects contained binding files.  (These were the same two projects that were being reported in the error. 

    I note that he VSS copies of the two projects were not up-to-date.

    Consequently I:

    1. Deleted the VSS copies
    2. Deleted the binding files from the working copies of the affected projects
    3. Removed the bindings when prompted
    4. Deleted the solution files for the offending projects
    5. Recreated the solutions
    6. Re-added the solutions to VSS

    "Touch Wood", after a couple of days all seams to be fine.

    Conclusion
    Something got way screwed up between the solution files and the VSS bindings for the solution and it's projects, whether it be corruption in the solution file or corruption in the project binding files.

    Rebuilding the solution has seemed to solve the problem.

    I sincerely thank you for you and Chao for your dedication and advice.

    Kind Regards

    Dave

     

    • Marked as answer by modao Wednesday, August 04, 2010 6:00 PM
    Wednesday, August 04, 2010 5:59 PM