Here
is the sample code written in C#
// Get
assembly details of the file...
System.Reflection.Assembly
a;
try
{
a
= System.Reflection.Assembly.LoadFrom (strCurrentPath);
}
catch(Exception
ex)
{
LblResult.ForeColor
= System.Drawing.Color.Red;
LblResult.Text
= "Error in Reading File. <br>" + ex.Message;
return
;
}
// Get
Version
System.Reflection.AssemblyName
an = a.GetName();
Version
v = an.Version;
lblVersion.Text
= "<b>Version : " + v.ToString() +"</b>";
lblDetails.Text
= "" +
"Name
" + an.Name.ToString() + "<br>" +
"CodeBase
" + an.CodeBase.ToString() + "<br>" +
"CultureInfo
" + an.CultureInfo.ToString() + "<br>" +
"EscapedCodeBase
" + an.EscapedCodeBase.ToString() + "<br>" +
"Flags
" + an.Flags.ToString() + "<br>" +
"FullName
" + an.FullName.ToString() + "<br>" +
"HashAlgorithm
" + an.HashAlgorithm.ToString() + "<br>" +
"Version
" + an.Version.ToString() + "<br>" +
"VersionCompatibility
" + an.VersionCompatibility.ToString() + "<br>" ;
Cheers,
Raja
-----Original Message-----
From: RameshGunturu
[mailto:[EMAIL PROTECTED]
Sent: Thursday, May
13, 2004 12:26 PM
To:
[EMAIL PROTECTED]
Subject: Regarding Assemblies...
Regarding
Assemblies...
|
Reply
|
|
|
From: RameshGunturu
|
|
I have a scenario like this, I have shared
assembly with three versions(1.0,2.0,3.0) deployed in GAC, I want to access
the latest version of assembly in my web application with out changing any
code in my application and web.config file, please let me know is their any
way to do this.
|
|
View other groups in this
category.