Show/Hide Toolbars

XSharp

Assuming assembly reference "Assembly Name #1" matches "Assembly Name #2", you may need to supply runtime policy

 

The two assemblies differ in release and/or version number. For unification to occur, you must specify directives in the application's .config file, and you must provide the correct strong name of an assembly, as demonstrated in the following example code.

Example

 

The following multifile sample references an assembly using two different external aliases. This first sample builds the older version of the code that creates assembly XS1701_d.

 

 

// XS1701_a.prg  
// compile with: /target:library /out:XS1701_d.dll /keyfile:mykey.snk  
 

 

Example

 

This is the code that creates the newer version of assembly XS1701_d. Note that it compiles into a different directory than the older version, necessary since the output files have the same names.

 

 

// XS1701_b.prg  
// compile with: /target:library /out:c:\\XS1701_d.dll /keyfile:mykey.snk  
 

 

Example

 

This sample sets up the external aliases A1 and A2.

 

 

// XS1701_c.prg  
// compile with: /target:library /reference:A2=c:\\XS1701_d.dll /reference:A1=XS1701_d.dll  
 

 

Example

 

This sample calls methods using two different aliases of A. The following sample generates C1701.

 

 

// XS1701_d.prg  
// compile with: /reference:c:\\XS1701_d.dll /reference:XS1701_c.dll  
// XS1701 expected