VS 2005 automatically deleting dlls?

Last post 10-31-2008 2:20 AM by Thomas Sun – MSFT. 1 replies.

Sort Posts:

  • VS 2005 automatically deleting dlls?

    10-29-2008, 2:13 PM
    • Member
      2 point Member
    • Flintronics
    • Member since 07-09-2008, 3:06 PM
    • Posts 13

    Hello,

     I have three projects (A, B and C) in one solution. B is the main start-up project and A and C are referenced by it and it is setup so the A.dll and C.dll are copied to B's bin folder. When i build the solution, A.dll is created in it's bin folder (as expected) and the same version is created in the B's bin folder along with the others.

     

    Now this is a vb project and contains some methods. When i run the project, the A.dll file exists in B's bin folder, but only until some methods are executed. The A.dll is deleted from B's bin folder before the program finishes and the next method fails because it can't find the file:

     
    "Could not load file or assembly '*****, Version=1.0.****.****, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."
     

    Why is this happening? Why don't the A.dll file stay in the B's bin folder until the application exits? Is there an option that i can choose that won't delete the A.dll files? Thank you for your help. 

  • Re: VS 2005 automatically deleting dlls?

    10-31-2008, 2:20 AM
    Answer

    Hi,

    If we add reference to other assemblies that are in the same solution, we can set Project Dependences (http://msdn.microsoft.com/en-us/library/zk4ahe0t%28VS.80%29.aspx) to make sure refered project is compiled before the project we add reference to.

     

    I look forward to hearing from you.

    Thomas Sun
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.
Page 1 of 1 (2 items)