Show/Hide Toolbars

XSharp

An assembly with the same simple name 'Assembly Name' has already been imported. Try removing one of the references or sign them to enable side-by-side.

 

This error points out that two references have the same assembly identity because the assemblies in question lack strong names, they were not signed, and thus the compiler has no way of distinguishing between them in metadata. Thus, the run time ignores the version and culture assembly name properties. The user should remove the redundant reference, rename one of the references, or provide a strong name for them.

Example

 

This sample creates an assembly and saves it to the root directory.

 

 

// XS1704_a.prg  
// compile with: /target:library /out:c:\\XS1704.dll  
 

 

Example

 

This sample creates an assembly with the same name as the previous sample, but saves it to a different location.

 

 

// XS1704_b.prg  
// compile with: /target:library /out:XS1704.dll  
 

 

Example

 

This sample attempts to reference both assemblies. The following sample generates XS1704.

 

 

// XS1704_c.prg  
// compile with: /target:library /r:A2=XS1704.dll /r:A1=c:\\XS1704.dll  
// XS1704 expected