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

How to get path to DLL within a class library

Don
Is it possible to determine where the DLL itself exists from within a class
library project at runtime, similar to the way Application.StartupPath works
for a windows application project?

- Don
Nov 20 '05 #1
2 6043
* "Don" <un*****@oblivion.com> scripsit:
Is it possible to determine where the DLL itself exists from within a class
library project at runtime, similar to the way Application.StartupPath works
for a windows application project?


\\\
MsgBox(System.Reflection.Assembly.GetAssembly(Me.G etType()).Location)
///

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
Is it possible to determine where the DLL itself exists from within a class
library project at runtime, similar to the way Application.StartupPath works
for a windows application project?

GetType(SomeClassOfYours).Assembly.Location

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 20 '05 #3

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

Similar topics

2
by: Teis Draiby | last post by:
(Using C#) Question 1: Is there an easy build-in support for determining wether a given file path is 1) A valid file path (Only legal characters) 2) The file exists 3) The path exists
5
by: Simon Harris | last post by:
Hi All, I've recently created a web service, which uses code within a class library I created. In my development environment, I have referenced the class library - This works fine. Problem...
6
by: ljlevend | last post by:
In my app the user can draw an arbitrary path onto an image. Now I need to determine all of the pixels that are contained within that path. Note that the path can intersect itself and I can...
0
by: tony | last post by:
Hello! I have one solution file that consist of three project. One project that build the exe file called A One project that build a user control dll. In this user control we have a class...
4
by: Dots | last post by:
I have a class library with a method called getpath(). I want to be able to get the full path of a folder and write some files to the (my_files_dir) folder. A console application will use this...
1
by: Andy Buckley | last post by:
Hi, I'd like to know if it's possible to clear the ld library search path within a single linker call. Specificlly, the problem is that I have two libraries A and B, and there's a version of...
7
by: Mihai | last post by:
For example: I have 2 projects (VB.NET) : A class library - Proj1 A windows control library - Proj2 I have a reference in proj2 for proj1 In the Build output path of project 1 I put the folder ...
4
by: Vlad | last post by:
I am having problems using the file.create method within a function that is called when looping through an array of filepaths. If I call my function with a hardcoded file path --C:\Temp.txt the...
4
by: =?iso-8859-1?Q?Atilla_G=F6kceg=FCn?= | last post by:
Hi guys, i've created a Client- and a Server-Forms-Class and a Users-Class-Library. The Class-Library (publisher) fires the event wich is handled within the Client-Class (subscriber).. but the...
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: 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: 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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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
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.