locked
class libraries debugging RRS feed

  • Question

  • I am creating a c# project using class libraries. The basic skeeton of the main project and the class lib. project worked well. When I tried to modify the class lib using some breakpoints for debugging, , the main project continues to use the old dll file only as against the newly modified one. I am building both the dll and the main project everytime I modify any one of them. Also the debugger dosn't stop at breakpoints. I am using c# with vs 2010.

    Pls give me a solution soon as I am approaching  my completion date.


    • Edited by RDchandrasekaran Thursday, November 5, 2015 11:20 PM
    • Moved by Kristin Xie Friday, November 13, 2015 6:50 AM move to better forum
    Thursday, November 5, 2015 11:19 PM

Answers

  • Hi RDchandrasekaran,

    >>I am creating a c# project using class libraries. The basic skeeton of the main project and the class lib. project worked well.

    So you mean that you add the class library project as a reference in your C# project, am I right?

    >>When I tried to modify the class lib using some breakpoints for debugging, , the main project continues to use the old dll file only as against the newly modified one.

    Do you mean that you modify your code in break mode while debugging If so, how about stopping debugging? Modify the code, and then debugging it again.

    Whether it is related to the Edit and Continue?

    https://msdn.microsoft.com/en-us/library/ms164926.aspx

    If you stop debugging, please also clean and rebuild your whole solution, one possible reason is that the dll file was not updated, if you add a dll/project reference, you could see that it has the property called "copy to local", so please change the settings "copy local=true", re-debug it again.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, November 13, 2015 9:37 AM

All replies

  • Are all projects in same solution? If not try to add in all one solution.

    If its already in same solution, then add reference to project not the DLL.

    Follow below steps to add Project reference.

    For example, Project A is main project and Project B is DLL.

    1. Right click on Project A, select "Add Reference"

    2. Click on "solution" from lest side.

    3. Checked the "Project B".

    4. Hit "ok"

    • Proposed as answer by Jigneshk Thursday, November 5, 2015 11:41 PM
    • Unproposed as answer by Jigneshk Friday, November 6, 2015 2:54 PM
    Thursday, November 5, 2015 11:41 PM
  • Hi RDchandrasekaran,

    Based on your description, your case more related to VS debug, I will move your case to VS debug forum for better support.

    Best regards,

    Kristin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, November 13, 2015 6:50 AM
  • Hi RDchandrasekaran,

    >>I am creating a c# project using class libraries. The basic skeeton of the main project and the class lib. project worked well.

    So you mean that you add the class library project as a reference in your C# project, am I right?

    >>When I tried to modify the class lib using some breakpoints for debugging, , the main project continues to use the old dll file only as against the newly modified one.

    Do you mean that you modify your code in break mode while debugging If so, how about stopping debugging? Modify the code, and then debugging it again.

    Whether it is related to the Edit and Continue?

    https://msdn.microsoft.com/en-us/library/ms164926.aspx

    If you stop debugging, please also clean and rebuild your whole solution, one possible reason is that the dll file was not updated, if you add a dll/project reference, you could see that it has the property called "copy to local", so please change the settings "copy local=true", re-debug it again.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, November 13, 2015 9:37 AM