R
Rob Richardson
Greetings!
I ran into the problem that a DLL could not be copied to the run file
because a newer version existed there. I seem to have gotten around it
temporarily, but I'd like to learn how DLL versioning should be managed. (A
coworker said that .Net replaced "DLL Hell" with "DLL Abyss".)
Here's my situation: I have been asked to take some pieces from a
decent-sized project out and make them into components so that other
projects can use them. I created six components, each one built in a
separate project. I have a solution named "Components" that contains all
six component projects. Some of those components contain references to
others of the components, but there are no circular references. All of the
references have their "Copy Local" property set to True. The main project
contains references to the DLL files located in the bin folders of the
component projects. Those references are also have Copy Local set to
"True".
After the "Dependency could not be copied" errors showed up, I removed all
of the references to the other components from all of my components and
created new ones using the Projects tab in the "Add References" dialog box.
I then deleted all of the files in all of my components' bin directories. I
then opened my main project. I was surprised to see that the DLL folders of
the components projects now had all of the files in them that I had just
deleted!
So, the bottom line is that beyond the bare concept that references are
required so programs will know about the structures of components they would
not otherwise know about, I understand nothing about them. Where can I find
a comprehensive discussion of how to manage references in the .Net world?
Some (but by no means all) specific questions:
1. What is the difference between referencing a project through the .Net
tab and the Projects tab in the "Add References" dialog box, and when would
I prefer using one over the other?
2. I understand from reading newsgroup postings that when looking for
references, C# (or .Net in general) will pull in the first correctly named
DLL it finds, even if that file is not in the folder the user told C# to
look for the DLL in. Why is that permitted?
3. How should I organize my DLLs and references in the project described
above?
4. What steps should I take when updating a component to make sure that
everything that needs to know about the updated version knows about it?
Thanks very much!
Rob Richardson
I ran into the problem that a DLL could not be copied to the run file
because a newer version existed there. I seem to have gotten around it
temporarily, but I'd like to learn how DLL versioning should be managed. (A
coworker said that .Net replaced "DLL Hell" with "DLL Abyss".)
Here's my situation: I have been asked to take some pieces from a
decent-sized project out and make them into components so that other
projects can use them. I created six components, each one built in a
separate project. I have a solution named "Components" that contains all
six component projects. Some of those components contain references to
others of the components, but there are no circular references. All of the
references have their "Copy Local" property set to True. The main project
contains references to the DLL files located in the bin folders of the
component projects. Those references are also have Copy Local set to
"True".
After the "Dependency could not be copied" errors showed up, I removed all
of the references to the other components from all of my components and
created new ones using the Projects tab in the "Add References" dialog box.
I then deleted all of the files in all of my components' bin directories. I
then opened my main project. I was surprised to see that the DLL folders of
the components projects now had all of the files in them that I had just
deleted!
So, the bottom line is that beyond the bare concept that references are
required so programs will know about the structures of components they would
not otherwise know about, I understand nothing about them. Where can I find
a comprehensive discussion of how to manage references in the .Net world?
Some (but by no means all) specific questions:
1. What is the difference between referencing a project through the .Net
tab and the Projects tab in the "Add References" dialog box, and when would
I prefer using one over the other?
2. I understand from reading newsgroup postings that when looking for
references, C# (or .Net in general) will pull in the first correctly named
DLL it finds, even if that file is not in the folder the user told C# to
look for the DLL in. Why is that permitted?
3. How should I organize my DLLs and references in the project described
above?
4. What steps should I take when updating a component to make sure that
everything that needs to know about the updated version knows about it?
Thanks very much!
Rob Richardson