473,503 Members | 1,650 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Assembly reference as a relative path?

We are distributing a VS2003 solution to our customers that
includes a .NET assembly (dll file) and a sample project for
how to use the dll. The customer can then customize the sample
or add a new project to the solution.

The problem is that the customers cannot simply take the
solution we distribute and build it. VS2003 is saving the
reference to the dll as an fully qualified absolute path
(not relative to the project), so after installing the
solution, each customer has to first manually add in the
dll reference to where it was installed on their computer.
Is there any way around this? It is possible to initially
enter a relative path but VS saves it as an absolute path.
Nov 16 '05 #1
4 27699
SP
"Richard" <rk********@hotmail.com> wrote in message
news:8b**************************@posting.google.c om...
We are distributing a VS2003 solution to our customers that
includes a .NET assembly (dll file) and a sample project for
how to use the dll. The customer can then customize the sample
or add a new project to the solution.

The problem is that the customers cannot simply take the
solution we distribute and build it. VS2003 is saving the
reference to the dll as an fully qualified absolute path
(not relative to the project), so after installing the
solution, each customer has to first manually add in the
dll reference to where it was installed on their computer.
Is there any way around this? It is possible to initially
enter a relative path but VS saves it as an absolute path.


If you look in a project file in notepad or an XML editor it appears that
references to a DLL are saved with relative path using the HintPath tag.
When you look at the properties on a referenced DLL the Path shown is
absolute but it would seem that VS is just resolving the HintPath to an
actual path. Assuming you have a bin directory and a samples directory
within your install directory (which can be changed by the person installing
the software), make sure the DLL is within the hierarchy of your installtion
directory so the HintPath will be something like "..\..\bin\MyDll.dll". i.e.
up to the Samples directory, up to the install directory, down to the bin
directory.

HTH

SP
Nov 16 '05 #2
I looked in the project file and there are no HintPath tags at all
(including none for the .NET Framework dll references). I inserted
a HintPath tag for my dll reference and Visual Studio still reports
it as missing when I load the project.

I happen to be building for Pocket PC platform, though I don't think
it should make any difference.

- Richard

"SP" <egatsecneserp(reverse)@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl...
If you look in a project file in notepad or an XML editor it appears that
references to a DLL are saved with relative path using the HintPath tag.
When you look at the properties on a referenced DLL the Path shown is
absolute but it would seem that VS is just resolving the HintPath to an
actual path. Assuming you have a bin directory and a samples directory
within your install directory (which can be changed by the person installing
the software), make sure the DLL is within the hierarchy of your installtion
directory so the HintPath will be something like "..\..\bin\MyDll.dll". i.e.
up to the Samples directory, up to the install directory, down to the bin
directory.

HTH

SP

Nov 16 '05 #3
SP
"Richard" <rk********@hotmail.com> wrote in message
news:un**************@TK2MSFTNGP14.phx.gbl...
I looked in the project file and there are no HintPath tags at all
(including none for the .NET Framework dll references). I inserted
a HintPath tag for my dll reference and Visual Studio still reports
it as missing when I load the project.

I happen to be building for Pocket PC platform, though I don't think
it should make any difference.


PocketPC project does use a different layout. I did the following and it
worked fine for me. I created a PocketPC project. I copied a DLL into the
project root folder. I added a reference to this DLL. I closed the project
and moved the project folder to a different location (and also renamed the
folder). I opened the project without any problem.

SP
Nov 16 '05 #4
Thanks, it worked for me also. I found that ReferencePath in the project file
is normally set to the full absolute path, except if the reference is in the
root then it is set to null. The lack of relative path is a clear deficiency
in Visual Studio and I guess this is the best I can do for now. The DLL in my
case is supposed to be a common file that can be referenced by multiple
projects. To distribute a solution that works out of the box would mean
adding a redundant copy of the DLL to each project.

- Richard
PocketPC project does use a different layout. I did the following and it
worked fine for me. I created a PocketPC project. I copied a DLL into the
project root folder. I added a reference to this DLL. I closed the project
and moved the project folder to a different location (and also renamed the
folder). I opened the project without any problem.

SP

Nov 16 '05 #5

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

Similar topics

1
4111
by: serge calderara | last post by:
Dear all, I ma update my assembly information and one of this information is the path to the registration key file. I have noticed that you need to provide the full path for the key file,...
4
7843
by: Win, Pats | last post by:
I have a snippet of HTML that I inject into a number of pages throughout my Web site at runtime. My problem is that I'm not getting the image to appear in all documents into which this snippet is...
1
4543
by: gowens | last post by:
I've been trying to strong name my VB.Net v1.1 assembly with the strong name key that we're using for a project. The strongname.snk file is located in a root-level directory. No matter what I...
3
2544
by: Richard Lewis Haggard | last post by:
I'm getting an error that should be easy but I don't understand the info structure well enough to know what's going wrong. I've been slowly adding classes and projects to a solution for a while....
3
4384
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here...
0
1262
by: Nick | last post by:
Hi, I need to strong name my application and thus have to specify the sn key path in the <Assembly: AssemblyKeyFile("strongNameKey.snk")> parameter. Observations: If I specify the hardcoded...
3
12217
by: JamesPaulHart | last post by:
Howdy! I'm following the Microsoft article http://msdn2.microsoft.com/en-us/library/ms228042.aspx to add Version info to my precompiled dlls. Essentially, it states that I modify my...
0
1330
by: Vahehoo | last post by:
Hi, I am trying to digitally sign an old application in ASP.Net. For that purpose I created a Strong Name Key File. The snk file is located in a root-level directory. in Bin\DG_Key directory....
2
4280
by: BD | last post by:
Hi there. Using 8.2 on Windows. I have a situation where I have a db backup, which I want to deploy to a group of developer workstations. The target directory for the database files will be...
0
7278
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,...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7458
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5013
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
380
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.