how to avoid broken references when give out projects

  • Thread starter Thread starter Tanja Krammer
  • Start date Start date
T

Tanja Krammer

Dear all,
is it possible to add reference with a relative path instead of absolute?
Thanks,
 
Tanja said:
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
 
Tanja Krammer said:
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 .
 
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?
 
Tanja Krammer said:
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").
 
Back
Top