473,320 Members | 2,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Get assembly version of calling program



I can get the assembly version with:

Assembly a = Assembly.GetExecutingAssembly();
AssemblyName an = a.GetName();
an.Version.ToString();
But if I put this in a class library, is there any way to get the
Version number of an assembly that would reference and call this class
library?
Nov 22 '05 #1
2 1962
Hi,

Check out Assembly.GetCallingAssembly()

"John Bailo" <ja*****@texeme.com> wrote in message
news:qP********************@speakeasy.net...
I can get the assembly version with:

Assembly a = Assembly.GetExecutingAssembly();
AssemblyName an = a.GetName();
an.Version.ToString();
But if I put this in a class library, is there any way to get the
Version number of an assembly that would reference and call this class
library?
Nov 22 '05 #2

Perfect! Thank you.

I'm writing my own smart client updater, and I want to make the client part
a .dll that any exe can reference. The .dll will manage lookups to a sql
server table to decide whether to shut down and download a new client or
not.

Siva M wrote:
Hi,

Check out Assembly.GetCallingAssembly()

"John Bailo" <ja*****@texeme.com> wrote in message
news:qP********************@speakeasy.net...
I can get the assembly version with:

Assembly a = Assembly.GetExecutingAssembly();
AssemblyName an = a.GetName();
an.Version.ToString();
But if I put this in a class library, is there any way to get the
Version number of an assembly that would reference and call this class
library?


--
http://www.texeme.com

"...i know that the hypnotized never lie."

Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Nick Malik | last post by:
Instead of posting a problem, I will post a solution to a problem that I've seen posted many times. One which I just hit and solved. I've been using signed assemblies (have to... they are...
1
by: Dan Foody | last post by:
Does anyone have any ideas how to resolve (or at least find the cause of) the following problem that occurs during loading of an application? I've never seen this type of error before and it only...
2
by: John Bailo | last post by:
I can get the assembly version with: Assembly a = Assembly.GetExecutingAssembly(); AssemblyName an = a.GetName(); an.Version.ToString(); But if I put this in a class library, is there any...
6
by: RoSsIaCrIiLoIA | last post by:
d_0=32.000000 d_1=38.000000 Test success d_0=34.000000 d_1=42.000000 Test success d_0=1.000000 d_1=0.000000 Test success
3
by: Michael Bøcker-Larsen | last post by:
Hi I'v been stuck on this problem for ages now. I have found that I'm not the only one with this problem, by looking through the different newsgroups. Hope you can help me! I know there is a...
4
by: Phil Galey | last post by:
I created an About box and am able to get all the assembly information from the program to show up in the About box except the Version. I created the About box as a separate Windows application,...
0
by: jason_cuteboy | last post by:
Hi all, Completely new to Vb.net and trying to create a simple VB Office Excel application/spreadsheet. When I built the project, and excel opens up an error comes up.... Customization assembly...
4
by: =?Utf-8?B?SmFu?= | last post by:
I have a .NET 2.0 application divided in two assemblies; the exe and a dll. The application generates a plugin-dll which is then loaded in a separate AppDomain (along with a second instance of my...
14
by: Monty | last post by:
Hello, I have created a solution which has both a web UI and a winform UI, the latter is just for administrators. The Web UI (a Web Application Project) and the winform project both...
8
by: Joe Withawk | last post by:
I have a solution consisting of a c# project as win application and a c++ project as classlibrary. Both are .net 2.0 The classlibrary handles some loading of quicktime movies, but that should not...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.