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

Getting the name of the calling assembly

Hello, I am creating a function which writes logging messages to a database.
Ideally, I would like to log the assembly name which is calling my logging
function. I know that I would use Me.GetType.ToString to get the current
assembly, but that would give me the assembly name of the logging function!
Do you have any ideas? I think I would need to use the reflection class or
something like that.

(I know the easy way would be to always pass Me.GetType.ToString to the
logging function, but I am trying to pass as little as possible!)

Thank you in advance for your help!

Nov 21 '05 #1
1 1166
Steve,

"Steve Singer" <ss************@Trendmls.com> schrieb:
I would like to log the assembly name which is calling my logging
function.


\\\
Imports System.Reflection
..
..
..
MsgBox([Assembly].GetCallingAssembly().FullName)
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2

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

Similar topics

1
by: Wilfried Mestdagh | last post by:
Hi, I try to make an about form and put it in my own namespace/class. It works but if I want to display eg application name, it does not. It display name of the calss where the aboutbox is in...
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...
2
by: William Gower | last post by:
I am trying to display a page that has a data grid on it. I get this message Description: An error occurred during the processing of a configuration file required to service this request....
1
by: Gos | last post by:
Hi, I have a DLL(say Test.DLL) which is being called by other DLLs in my application. I want to know which DLL is calling my Test.DLL. I want to get the name of the calling assembly within my...
2
by: Andrew Jocelyn | last post by:
Hi I get this error when I change something in the web.config file. When I build the VS projects and load the first web page the application runs fine. If I then make a save the web.config file...
0
by: ruju00 | last post by:
I am getting an error in Login() method of the following class FtpConnection public class FtpConnection { public class FtpException : Exception { public FtpException(string message) :...
7
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
I have a C# logging assembly with a static constructor and methods that is called from another C# Assembly that is used as a COM interface for a VB6 Application. Ideally I need to build a file...
0
by: JB | last post by:
I have an ASP project written years ago that I have recently started to try and update. It was written by someone who used to work here before me, and the source code I have is in a major mess. ...
3
by: codefragment | last post by:
Hi I'm stuck with the basics of CAS. I have a solution with two projects, Assembly1 and Assembly2. Assembly1 is happily making calls to the registry, filesystem, etc Assembly1 calls a method on...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.