none
VS2010 used an assembly in the GAC in stead of the project reference that was explicitly set in my project RRS feed

  • Question

  • When running my Windows Forms project in the debugger using F5 it uses the assembly version in the GAC in stead of the actual project referenced, thus ignoring the changes I make to my reference project.

    If I remove the assembly from the GAC it works, but I woul like to be able to develop and test my assembly withoud having to remove my installed version first every time.

    What is the best way to achieve this? Giving my reference project a defferent version number for instance?

    Is this behaviour considered a bug that will be patched any time soon?

     

     

    • Moved by Victor_Chen Thursday, October 21, 2010 9:16 AM GAC (From:MSBuild)
    Wednesday, October 20, 2010 8:57 AM

Answers

  • Hi,

    Thanks for your post. If I understood it correctly, your application always use the assembly in GAC instead of the actually used one. Why there's always an installed version in the GAC since you don't want to use it? Who installed that version again after you removed it? According to here, "...the Binder follows the "GAC always wins" policy. This might play a role in deciding whether or not an assembly needs to be placed in the GAC." So this explains what you have experienced. We could remove the GAC one permanently if possible, or automatically increase the version number of the referenced assembly so the GAC one won't be a match. Please correct me if I mis-understood you.


    Please mark the right answer at the right time.
    Thanks,
    Sam
    • Marked as answer by SamAgain Sunday, October 31, 2010 2:57 PM
    Friday, October 22, 2010 3:43 AM

All replies

  • Hi Marco,

     

    Thanks for your post.

    I think this issue is more relevant to CLR, I'm going to move it.

    Hope you can get more helpful information there.

     

     

    Best Regards,

    Ziwei Chen

     

    Thursday, October 21, 2010 9:15 AM
  • Hi,

    Thanks for your post. If I understood it correctly, your application always use the assembly in GAC instead of the actually used one. Why there's always an installed version in the GAC since you don't want to use it? Who installed that version again after you removed it? According to here, "...the Binder follows the "GAC always wins" policy. This might play a role in deciding whether or not an assembly needs to be placed in the GAC." So this explains what you have experienced. We could remove the GAC one permanently if possible, or automatically increase the version number of the referenced assembly so the GAC one won't be a match. Please correct me if I mis-understood you.


    Please mark the right answer at the right time.
    Thanks,
    Sam
    • Marked as answer by SamAgain Sunday, October 31, 2010 2:57 PM
    Friday, October 22, 2010 3:43 AM