473,569 Members | 3,043 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 1667
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_**********@h otmail.com> wrote in message
news:Yp******** ***********@new ssvr13.news.pro digy.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
9251
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 code was littered with document.all and eval, for example, and I wanted to create a practical list of best practices that they could easily put to...
2
1828
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 assembly(s) I build must be installed in the GAC. My assembly(s) needs to include the following: - my own class/utility librarary code
0
1896
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 to have it shared. Usually I work with a Web application project that has a reference to my shared, custom controls assembly. Web project is a...
9
4169
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 post-build events to automate GAC installation processes and the asp.net application has "copy to local" set to false for the references of these shared...
10
3426
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 somewhere that each folder under the "web site" is compiled in separate assembly. I however, did not find that the "web site" creation in vs.net...
2
6889
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 data but then I have other forms that give the ability to add, modify, and delete rows. This of course changes the dataset and I need that reflected...
4
3345
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 interface member implementation?! Is there a workaround to this problem?! Best regards, Philippe Rubbrecht
0
1400
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 by us. It opens an assembly in the same directory (lets call it MainAssembly). That assembly contains a control which is then displayed in the...
0
2482
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 solution. Issue is when I call HandleException method in a project of type class library, it gives the following error. If I call the same method in a...
0
7703
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
1
7681
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7983
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6290
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5228
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2118
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 we have to send another system
1
1229
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.