none
Different Assemblies, Namespaces and classes are in same names RRS feed

  • Question

  • Hi,

               I have an application where dlls will add in dynamically and utilizing its class and methods, while developing the application I called classes in available dll and I exclude the dll at the time of release where I have an option to add that dll at run-time.

              If there is any update, I need to give that same dll with different name (suffix included as version number) where class and methods have little update but namespace, class and methods names have no change.

              While calling the class which are different from original assembly(added in reference at the time of developing) I got the below error.

     Could not load file or assembly 'SmartRPA.Activities_1.0.0, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

    Thursday, August 2, 2018 4:41 AM

All replies

  • Hi Dhanasekar,

    If I understand it correctly - you want to use different versions of same Dll in your app? Please confirm and also you can take a look at - https://blogs.msdn.microsoft.com/abhinaba/2005/11/30/c-2-0-using-different-versions-of-the-same-dll-in-one-application/


    Thanks,
    Vivek Bansod
    Blog | MSDN | LinkedIn
     

    Friday, August 3, 2018 7:34 AM
  • Hi Dhanasekar Velayudham,

    Thank you for posting here.

    If you have defined an identical namespace and type name in your project and the added assembly, you will get a conflict with any code that tries to use one or another of these types. Because it is more accurate to say that from the CLR perspective, a type is uniquely identified by its name and assembly. 

    If you ensure you have unique namespaces, as do your references you wouldn't have this problem.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, August 3, 2018 7:37 AM
    Moderator
  • Could not load file or assembly 'SmartRPA.Activities_1.0.0, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified

    Where is the DLL based on its version number that should be in the location of the other DLL(s) being used b the program?


    • Edited by DA924x Friday, August 3, 2018 7:39 AM correction
    Friday, August 3, 2018 7:39 AM