By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,417 Members | 904 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,417 IT Pros & Developers. It's quick & easy.

how to avoid broken references when give out projects

P: n/a
Dear all,
is it possible to add reference with a relative path instead of absolute?
Thanks,
Mar 22 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Tanja Krammer wrote:
Dear all,
is it possible to add reference with a relative path instead of absolute?
Thanks,


Yes...

Of course I could be more helpful if you described how you were using
the path in question.

If you just need to know the directory where the executable was launched
from then use Application.StartupPath

Chris
Mar 23 '06 #2

P: n/a

"Tanja Krammer" <ta***********@delay.nop> wrote in message
news:uP**************@TK2MSFTNGP12.phx.gbl...
Dear all,
is it possible to add reference with a relative path instead of absolute?
Thanks,


Yes, but keep in mind the reference path needs to be in reference to the exe
file - not the source code - so you're starting in the bin folder.
FOr instance, if you access an image in the same folder as the exe you can
use "./imagename.jpg" - or leave off the "./" if you want .
Mar 23 '06 #3

P: n/a
But how you do that? When you press "Add Reference" button you have no field
to type something, you only can browse. Do you edit project file directly?
"Hal Rosser" <hm******@bellsouth.net> schrieb im Newsbeitrag
news:0B**************@bignews8.bellsouth.net...

"Tanja Krammer" <ta***********@delay.nop> wrote in message
news:uP**************@TK2MSFTNGP12.phx.gbl...
Dear all,
is it possible to add reference with a relative path instead of absolute?
Thanks,


Yes, but keep in mind the reference path needs to be in reference to the
exe
file - not the source code - so you're starting in the bin folder.
FOr instance, if you access an image in the same folder as the exe you can
use "./imagename.jpg" - or leave off the "./" if you want .

Mar 23 '06 #4

P: n/a
"Tanja Krammer" <ta***********@delay.nop> schrieb:
is it possible to add reference with a relative path instead of absolute?


Check out the contents of the VB.NET project file in notepad. It will
contain a relative path and an absolute "hint path" for references, which
helps VS.NET to quickly locate the DLL when the project is opened. However,
the compiled application should be able to find the DLL if it's contained in
the application's directory.

BTW: There is a German VB.NET group available
("microsoft.public.de.german.entwickler.dotnet.vb" ).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Mar 23 '06 #5

P: n/a
"Tanja Krammer" <ta***********@delay.nop> schrieb
Dear all,
is it possible to add reference with a relative path instead of
absolute? Thanks,

This might be of interest:
http://msdn.microsoft.com/library/en...assemblies.asp
Armin

Mar 23 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.