locked
Compiling code again that is currently used in another program RRS feed

  • Question

  • if I make a DLL in C# and then build it and use it in another program, will updating that DLL with new code and rebuilding it update the current one being used, assuming the one being used is in the same directory as the one i just rebuilt?
    Adrien....What?
    Tuesday, July 13, 2010 5:31 PM

Answers

  • The answer is possibly, maybe even probably.

    It depends on a number of factors including how your assemblies are signed, how you set versions, and is the DLL in the GAC (the answer to the last bit seems to be no since you talk about the directory).

    I suggest just copying the existing version somewhere safe, placing the new version in the directory then testing it with the appropriate exes. You would have to do that in any case to avoid unpleasant surprises.


    Regards David R --------------------------------------------------------------- "Every program eventually becomes rococo, and then rubble." - Alan Perlis The only valid measurement of code quality: WTFs/minute.
    • Proposed as answer by Nancy Shao Friday, July 16, 2010 5:39 AM
    • Marked as answer by Harry Zhu Friday, July 23, 2010 6:43 AM
    Tuesday, July 13, 2010 9:24 PM

All replies

  • The answer is possibly, maybe even probably.

    It depends on a number of factors including how your assemblies are signed, how you set versions, and is the DLL in the GAC (the answer to the last bit seems to be no since you talk about the directory).

    I suggest just copying the existing version somewhere safe, placing the new version in the directory then testing it with the appropriate exes. You would have to do that in any case to avoid unpleasant surprises.


    Regards David R --------------------------------------------------------------- "Every program eventually becomes rococo, and then rubble." - Alan Perlis The only valid measurement of code quality: WTFs/minute.
    • Proposed as answer by Nancy Shao Friday, July 16, 2010 5:39 AM
    • Marked as answer by Harry Zhu Friday, July 23, 2010 6:43 AM
    Tuesday, July 13, 2010 9:24 PM
  • Hello,

    Based on my understanding, you are asking whether the dll will be updated in other project if current dll project is rebuilt. If so, it depends on how you add the dll to your project.

    If you use Add Reference to include this dll into your project, the dll will be updated. But if you only to copy this dll to your project directory and some other place, and add reference with this path, the dll will be not update even dll project is rebuilt.

    Best Regards,
    Nancy


    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.
    Thursday, July 15, 2010 9:19 AM
  • i think the guy above you is right. because if i build the dll and reference it from the folder it gets built to and then rebuild it with new code, the dll being referenced does not update
    Adrien....What?
    Thursday, July 15, 2010 5:34 PM