473,508 Members | 2,346 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Shared Assembly best practices?

CK
Good Morning All,
What the best way to use references? Reference a project in another project
or reference a DLL. We are developing C# Sharp Web Apps in VS 2003.
We are getting warnings like the following.
Warning: The dependency 'TTT.Library, Version=1.0.0.1, Culture=neutral' in
project 'Dmt' cannot be copied to the run directory because it would
overwrite the reference 'TTT.Library, Version=1.0.0.3, Culture=neutral'.
When I search for the file on my local box, I am getting several different
versions found in different projects. We were sort of taught, when building
a solution, the solution would contain several projects, we add the projects
to the solution as needed, then do project references inside each project
that may need that library. Is this a bad idea? Should we have just one
project in a solution and use GACUTIL.exe so it is available to all
projects? Does anyone have any good links deiscussing these topics? We had
thought if you make changes to a project that is referenced in other
projects, they would all keep the same versions. It doesn't seem to work
quite this way. Any feedback is always appreciated.
TIA,
~CK
Jun 20 '06 #1
2 1663
The reason you are getting this is because you do not have a fixed assembly
version. And different DLLs are compiled with different version of this DLL

You have 3 options:

1. Ignore this error. Your assembly should be getting built anyway
2. Set the version number for the referenced DLL
3. Set CopyLocal to False in the dll reference properties

If you use the GAC, you will need to fix the assembly version, or else every
time this DLL gets recompiled, you will need to recompile everything that
references it.

I personally like to keep 1 project for every solution. This avoids any
messes or confusion.

"CK" <c_**********@hotmail.com> wrote in message
news:Yp*******************@newssvr13.news.prodigy. com...
Good Morning All,
What the best way to use references? Reference a project in another
project or reference a DLL. We are developing C# Sharp Web Apps in VS
2003.
We are getting warnings like the following.
Warning: The dependency 'TTT.Library, Version=1.0.0.1, Culture=neutral' in
project 'Dmt' cannot be copied to the run directory because it would
overwrite the reference 'TTT.Library, Version=1.0.0.3, Culture=neutral'.
When I search for the file on my local box, I am getting several different
versions found in different projects. We were sort of taught, when
building a solution, the solution would contain several projects, we add
the projects to the solution as needed, then do project references inside
each project that may need that library. Is this a bad idea? Should we
have just one project in a solution and use GACUTIL.exe so it is available
to all projects? Does anyone have any good links deiscussing these topics?
We had thought if you make changes to a project that is referenced in
other projects, they would all keep the same versions. It doesn't seem to
work quite this way. Any feedback is always appreciated.
TIA,
~CK

Jun 20 '06 #2
Hi,

CK wrote:
Good Morning All,
What the best way to use references? Reference a project in another project
or reference a DLL. We are developing C# Sharp Web Apps in VS 2003.
We are getting warnings like the following.
Warning: The dependency 'TTT.Library, Version=1.0.0.1, Culture=neutral' in
project 'Dmt' cannot be copied to the run directory because it would
overwrite the reference 'TTT.Library, Version=1.0.0.3, Culture=neutral'.
When I search for the file on my local box, I am getting several different
versions found in different projects. We were sort of taught, when building
a solution, the solution would contain several projects, we add the projects
to the solution as needed, then do project references inside each project
that may need that library. Is this a bad idea? Should we have just one
project in a solution and use GACUTIL.exe so it is available to all
projects? Does anyone have any good links deiscussing these topics? We had
thought if you make changes to a project that is referenced in other
projects, they would all keep the same versions. It doesn't seem to work
quite this way. Any feedback is always appreciated.
TIA,
~CK


Tastes and best practices differ... Marina told you that she prefers
having one project per solution. Me I prefer referencing projects,
except if it's a foreign assembly, the version of which is unlikely to
change.

The last project I did was ASP.NET 1.1, and we had inputs from about 15
developers, the version conflicts would have been a nightmare if we
didn't work with referenced projects. We couldn't set a fixed version
because we were using automated builds, and also for clarity.

YMMV, but for me, it's clearly better to reference projects.

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
Jun 21 '06 #3

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

Similar topics

136
9201
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
2
1824
by: Donal McWeeney | last post by:
Hi, Are there any good guidance white papers out there on the best way to design and build assemblys in VS.Net that would cover the following questions I have and requirements I know of: The...
0
1889
by: RadekP | last post by:
Hi Gurus .. I would really appreciate some insights for the problem that bugs me for quite some time. I keep my custom controls in their own shared (private/public key signed) assembly. I need...
9
4165
by: Invalidlastname | last post by:
Hi, We developed some assemblies which use EnterpriseServices queued components. In order to use EnterpriseServices, these assemblies need to be installed into GAC. I used the pre-build and...
10
3416
by: jojobar | last post by:
Hello, I am trying to use vs.net 2005 to migrate a project originally in vs.net 2003. I started with creation of a "web site", and then created folders for each component of the site. I read...
2
6884
by: John Granade | last post by:
I'm looking for the best way to make a dataset available from multiple Windows forms. The dataset is created from an XML file. I have a main form (frmMain) that loads the dataset and reads the...
4
3332
by: Rubbrecht Philippe | last post by:
Hi there, I would like to develop an interface that when implemented in a class requires a number of shared properties or methods to be available. It seems a Shared Member can not be used as...
0
1396
by: kanaille11 | last post by:
Hi, at the moment we have very strange problems with assembly directories: Following is the main structure of our project: - An ActiveX-control in "d:\TheProject\bin\debug" which is developed...
0
2479
by: =?Utf-8?B?Sm9iIExvdA==?= | last post by:
I have created Exception Handling Policy that shows a custom error message using Custom Handler and logs it to event log using Logging Handler. I am using this policy in various layers of my...
0
7225
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
7324
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
7382
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...
1
7042
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...
1
5052
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
3193
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1556
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
418
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.