Show/Hide Toolbars

XSharp

The type TypeName1 exists in both TypeName2 and TypeName3

 

Two different assemblies referenced in your application contain the same namespace and type, which produces ambiguity.

 

To resolve this error, use the alias feature of the /reference (X# Compiler Options) compiler option or do not reference one of your assemblies.

Example

 

This code creates the DLL with the first copy of the ambiguous type.

 

 

// XS0433_1.prg  
// compile with: /target:library  
 

 

Example

 

This code creates the DLL with the second copy of the ambiguous type.

 

 

// XS0433_2.prg  
// compile with: /target:library  
 

 

Example

 

The following example generates XS0433.

 

 

// XS0433_3.prg  
// compile with: /reference:XS0433_1.dll /reference:XS0433_2.dll  
 

 

Example

 

The following example shows how you can use the alias feature of the /reference compiler option to resolve this XS0433 error.

 

 

// XS0433_4.prg  
// compile with: /reference:XS0433_1.dll /reference:TypeBindConflicts=XS0433_2.dll