Error "Assembly Same Simple Name Already Imported"

This is a CLR project. I import two DLL files with the same name, quizz.dll (I renamed the old version as legacyquizz.dll ), and I included the new version as quizz.dll in the test project for an obsolete converter. (The project of the tested old project imports only the old quizz.dll ).

This is the error I am getting.,.

An assembly with the same simple name "Quizz, Version = 2.0.0.1, Culture = Neutral, PublicKeyToken = null has already been imported.

Try to remove one of the links or sign them to include side by side. c: \., \ Quizz.dll

The path that it points to is the destination of the new version of quizz.dll.

I use an external alias in the legacyquizz.dll file:

 extern alias legacy; 

What is a "simple name" in this context?

+13
source share
4 answers

You can see the simple name by opening the project properties and selecting "Assembly Information":

enter image description here

To sign the assembly, you need to select the Signature tab and create or select a signature:

enter image description here

+5
source

You have two assemblies with the same name (not file name, assembly name). There are two solutions for this:

  • Rename one of the assemblies from the project properties and recompile.
  • Configure Strong Name Signing on the assembly so that two separate versions of the same assembly can coexist.
+3
source

If you are working with the new version of .csproj, you may encounter this problem after adding a link to another solution project, if the link already exists as a dependency on the assembly (this link can be automatically added by Visual Studio).

In Solution Explorer, expand the conflicting project, go to Dependencies-> Assemblies, and make sure that there is no existing reference to the assembly that is causing the conflict. If it exists, just delete it and the conflict will be resolved.

0
source

I also think this problem is in my project. I changed my dll path to a different folder and changed the reference path for the same (dependency levels). This will work. No duplication occurs.

-2
source

All Articles