"An assembly with the same simple name has already been imported" error message
-
I am trying to reference 2 identical assemblies with only their filename and version to be different. I need this in order to support several versions for backward compatibility. I've created an alias name for one of them and the other stayed "global". Also added the "extern alias" declaration at the start of the source code. I'm getting compiler error (my real module name was switched with [module name] here): "An assembly with the same simple name '[module name], Version=1.0.0.0, Culture=neutral, PublicKeyToken=null has already been imported. Try removing one of the references or sign them to enable side-by-side." One of these two assemblies does have a version 1.0.0.0, but the other has 1.5.0.0 and I can see that when I highlight them in the solution explorer in the properties window. The assemblies are not signed, and I do not currently wish to make them as such. Why is this error? The versions are clearly different… is there a way to solve this? i'm using VS2012.
-
I am trying to reference 2 identical assemblies with only their filename and version to be different. I need this in order to support several versions for backward compatibility. I've created an alias name for one of them and the other stayed "global". Also added the "extern alias" declaration at the start of the source code. I'm getting compiler error (my real module name was switched with [module name] here): "An assembly with the same simple name '[module name], Version=1.0.0.0, Culture=neutral, PublicKeyToken=null has already been imported. Try removing one of the references or sign them to enable side-by-side." One of these two assemblies does have a version 1.0.0.0, but the other has 1.5.0.0 and I can see that when I highlight them in the solution explorer in the properties window. The assemblies are not signed, and I do not currently wish to make them as such. Why is this error? The versions are clearly different… is there a way to solve this? i'm using VS2012.
-
I am trying to reference 2 identical assemblies with only their filename and version to be different. I need this in order to support several versions for backward compatibility. I've created an alias name for one of them and the other stayed "global". Also added the "extern alias" declaration at the start of the source code. I'm getting compiler error (my real module name was switched with [module name] here): "An assembly with the same simple name '[module name], Version=1.0.0.0, Culture=neutral, PublicKeyToken=null has already been imported. Try removing one of the references or sign them to enable side-by-side." One of these two assemblies does have a version 1.0.0.0, but the other has 1.5.0.0 and I can see that when I highlight them in the solution explorer in the properties window. The assemblies are not signed, and I do not currently wish to make them as such. Why is this error? The versions are clearly different… is there a way to solve this? i'm using VS2012.
-
-
I am trying to reference 2 identical assemblies with only their filename and version to be different. I need this in order to support several versions for backward compatibility. I've created an alias name for one of them and the other stayed "global". Also added the "extern alias" declaration at the start of the source code. I'm getting compiler error (my real module name was switched with [module name] here): "An assembly with the same simple name '[module name], Version=1.0.0.0, Culture=neutral, PublicKeyToken=null has already been imported. Try removing one of the references or sign them to enable side-by-side." One of these two assemblies does have a version 1.0.0.0, but the other has 1.5.0.0 and I can see that when I highlight them in the solution explorer in the properties window. The assemblies are not signed, and I do not currently wish to make them as such. Why is this error? The versions are clearly different… is there a way to solve this? i'm using VS2012.
-
i already found this before, but it does not offer a working solution: i cannot change the assembly info since it is a compiled module and as i said - the assemblies are not signed, but they have a different version. Any other way to make it work?
-
I am trying to reference 2 identical assemblies with only their filename and version to be different. I need this in order to support several versions for backward compatibility. I've created an alias name for one of them and the other stayed "global". Also added the "extern alias" declaration at the start of the source code. I'm getting compiler error (my real module name was switched with [module name] here): "An assembly with the same simple name '[module name], Version=1.0.0.0, Culture=neutral, PublicKeyToken=null has already been imported. Try removing one of the references or sign them to enable side-by-side." One of these two assemblies does have a version 1.0.0.0, but the other has 1.5.0.0 and I can see that when I highlight them in the solution explorer in the properties window. The assemblies are not signed, and I do not currently wish to make them as such. Why is this error? The versions are clearly different… is there a way to solve this? i'm using VS2012.
In an app where you think about "backward compatibility" and other things you should really use strong names for the assemblies - So I'd question why you are not using strong-names (signing). I can't think about a good reason for not doing it (and solving your problem) other than "too lazy to manage the certifcate"... Even if you don't worry about installing your assembly in the GAC or your manufacturer authenticity, there a good reasons for signing - you just found one!
-
In an app where you think about "backward compatibility" and other things you should really use strong names for the assemblies - So I'd question why you are not using strong-names (signing). I can't think about a good reason for not doing it (and solving your problem) other than "too lazy to manage the certifcate"... Even if you don't worry about installing your assembly in the GAC or your manufacturer authenticity, there a good reasons for signing - you just found one!
Signing the assemblies would probably be the best solution - i agree. At the moment it is not feasible since there are clients with this module in the field already that cannot be upgraded with new signed assemblies. I am using a workaround for this in the meantime - I am changing the assembly name from the project properties (changing the version and the title in assembly information did not work). I still have a few tests to do before I'll know it is working for sure (without the need to upgrade any client modules).