I have 2 different assemblies with the same name I need to add to my project.
When I try to add both references to the project, visual studio tells me the assembly is already referenced (because there is already an assembly with the same name).
I tried renaming one of the files. I could add both references but then, when accessing methods from the renamed assembly, resolving it fails (because .net tries to load the assembly with the original name).
Note: The assemblies are not mine, therefore I cant change their contents.
If they are strongly signed and have different public keys maybe you can try this:
Have a separate library project for wrapping one of the two assemblies. That way you can choose a different name and namespace for one of them and then reference one of the two assemblies directly and the other indirectly.
The challenge will be that if both assemblies have the same file name you cannot have them in the same folder during runtime. As they are strongly signed you can put them both into the Global Assembly Cache (GAC) or you can put one of the two in a subfolder during runtime and add that subfolder to the probing path.
Good luck!