473,386 Members | 1,598 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,386 software developers and data experts.

Get Application reference assembly at runtime

Dear all,

Is there a way to get the list of references attached to
my application by code?

The idea is that when my application start, I would like
to log in a file the version of all assembly used.

thanks for your answer
regards
Jul 21 '05 #1
1 6333
Serge calderara <se*************@maillefer.net> wrote:
Is there a way to get the list of references attached to
my application by code?

The idea is that when my application start, I would like
to log in a file the version of all assembly used.


Well, you can find out all the assemblies which are loaded in a
particular AppDomain using AppDomain.GetAssemblies. However, if your
app only uses some of the assemblies that it references later on, those
assemblies won't have been loaded into the AppDomain.

You *could* find your executable file and read which assemblies it
references, but that would be a bit of a pain.

You could also hook into AppDomain.AssemblyLoad and log the version
loaded when each assembly loads - but again, that wouldn't get you
everything right at the start.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #2

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

Similar topics

2
by: Terence Shek | last post by:
Is there a way to set the application binding policy so that it always binds to the latest version of an assembly? I'm hoping there is a way to avoid updating the application's binding...
8
by: JohnnySparkles | last post by:
Hi All, I'm working on an application which uses a dll for some of its classes. I build the application and the dll and it runs fine on any machine with Visual Studio .NET installed on it....
4
by: Edward Diener | last post by:
I have a class Y in assembly B which is derived from a class Z in assembly C. So I correctly add a reference to assembly C in assembly B, build assembly B and everything builds fine. Now I create...
3
by: Gustavo L. Fabro | last post by:
Greetings! I'm testing VS 2005 Beta 2, and I've compiled a program that runs just fine on my computer (where VS is installed). I've tried to run this same program on another computer (after...
3
by: Tiraman | last post by:
Hi, Can some one explain me why do i need to compile a web application or in other words , what is the deference between 2 web sites (same files) but one of them was compiled and the other...
4
by: Umut Tezduyar | last post by:
I want to use my custom control (.cs) in my web application. Custom control is in the same assembly as my application. I want to know the name of the assembly (.dll) file so i can add it's...
6
by: beaker | last post by:
Hello, Is there a way to get the name of my application (as it appears on the list of processes running) at runtime? (Something to do with System.Reflection...?) Thanks, Gary
0
by: Kevin | last post by:
I have a vb com+ component and turn it to web service by using check box Use Soap. It was works fine, but after I installed .net 2.0, does not work anymore. I got the following errors: ...
6
by: =?Utf-8?B?d2lsbGlhbQ==?= | last post by:
Hi, I posted this in wrong group, so just re-post here. There are two ways to create web-based application or web service, from VS start page, click on File and New, two options you can choose,...
7
by: =?Utf-8?B?VG9kZCBKYXNwZXJz?= | last post by:
Hey Guys, I'm totally flipping out. I developed an application which makes use of the built in Visual Studio 2005 Crystal Reports components. I have references on my solution which state: ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.