You can set this information using the appropriate tags in the
Assemblyinfo.cs class file. You can retrieve it using the appropriate
methods such as GetCustomAttributes.
Here's a short snippet that gets the AssemblyConfiguration item:
private string buildMode=String.Empty;
private void Page_Load(object sender, System.EventArgs e)
{
Assembly asm = Assembly.GetExecutingAssembly();
object[] objArray=asm.GetCustomAttributes(false) ;
foreach (object obj in objArray)
{
AssemblyConfigurationAttribute conf =
obj as AssemblyConfigurationAttribute;
if (conf != null)
this.buildMode=conf.Configuration ;
}
Response.Write("Build Mode: " +this.buildMode);
}
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Orgbrat" wrote:
Is there a way to retrieve a WinForms application information such as
Company, Product and Version from within a
class library ( DLL ) that the Winforms application is using. Specificly the
applications specfic ApplicationData directory.
This is not a problem from within the application, all you need to do is use
Application.UserAppDataPath but I need this
same location from inside the class library ( DLL ). C# example would be
nice! Thanks....
Orgbrat