none
register dll with several versions for interop RRS feed

  • Question

  • Hi,

    for the following explanations and questions note this first:
    I know .net is able to do that but the question is whether interop registration can handle that.

    I have an c# project where I implement some add-ins for an application.
    I need to register the dlls for interop so that the application can access the addins.

    I have a common-project which is referenced by all my add-ins.

    Up to now I had the following situation:

    - addin A installed uses common.dll version 1.0
    - addin B installed was using comm.dll version 1.0

    Everything worked fine.

    Now I have the following new situation:

    - addin A installed uses common.dll version 1.0
    - addin B has been re-installed using new comm.dll version 1.0 (just because assemblyversion has not been modified, the dll changed)

    The problem now is, that addin A seems to use the new common.dll of addin B although addin A has its own physical common.dll in its own add-in installation folder and also addin B has its own installation folder.

    I think the re-registration of addin B overwrote the current registration of the common dll and both addins now point to the same (new) common.dll of addin B.

    My question now is, whether it is possible to get the following wished situation when I change the assemblyversion of the common.dll to 2.0 or 1.1 before reinstalling addin B and therefore reregister common.dll but under another version:

    - addin A still installed using old common.dll version 1.0
    - addin B new installed using new common.dll version 2.0

    That means in registry there are two common dlls under two different versions with each pointing to another path.
    I know.net is able to do that but the question is whether interop registration can handle that.

    Thanks for any advice and hint.

    Thursday, April 30, 2015 12:42 PM

Answers

  • Hello Kaspatoo,

    >>My question now is, whether it is possible to get the following wished situation when I change the…

    I do not sure what add-in you are working with, with your description, I created a .NET based COM interop assembly and register it twice with different version number, it could register successfully

    however, when trying to invoke it, it will invoke the new one. So in my opinion, the assembly seems to be covered actually. My suggestion is that you could follow the approach the Visual Studio used as named an assembly with a version flag as below:

    Regards.


    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, May 1, 2015 2:56 AM
    Moderator