By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,979 Members | 1,349 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,979 IT Pros & Developers. It's quick & easy.

refer the version

P: n/a
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

Jan 30 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.