refer the version

K

kalaivanan

hi,
i am using two versions of a particular dll cust.ll.
how do i make a class file to refer the two versions of cust.dll.

eg:
version one :
using System;
using System.Reflection;

[assembly: AssemblyKeyFile("test.txt")]
[assembly: AssemblyVersion("2.0.0.0")]

public class cust
{
public void NameTwo()
{

Console.WriteLine("testing assembly from version two");
}
}

sn -k test.txt
csc /t:library cust.dll
gacutil -i cust.dll

==================================
version two :
using System;
using System.Reflection;

[assembly: AssemblyKeyFile("test.txt")]
[assembly: AssemblyVersion("3.0.0.0")]

public class cust
{
public void NameThree()
{

Console.WriteLine("testing assembly from version three");
}
}

sn -k test.txt
csc /t:library cust.dll
gacutil -i cust.dll

===================================

client file

using System;
public class Client
{
public static void Main()
{
cust obj = new cust();
obj.NameTwo();
obj.NameThree();
}
}

csc /r:cust.dll client.cs

when i execute this i am getting the following error:
'cust' does not contain a definition for NameTwo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top