473,399 Members | 3,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

The dependency .... could not be found. DLL Hell in .NET?

rm
What is the difference between now and the VB 6.0 days? I have a
project with several dependencies. When I attempt to execute the
application from the IDE several error messages are displayed related
to "missing" dependencies. The files that "cannot be found" do in fact
exist in the exact location recorded in the IDE. What am I missing?

Nov 21 '05 #1
4 5883

"rm" <gr****@rlmoore.net> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
What is the difference between now and the VB 6.0 days? I have a
project with several dependencies. When I attempt to execute the
application from the IDE several error messages are displayed related
to "missing" dependencies. The files that "cannot be found" do in fact
exist in the exact location recorded in the IDE. What am I missing?


A .NET assembly is loaded not just by name, but by the combination of name
and version.

In your class libraries do you have AssemblyVersion set to automatically
increment? If so, don't. You should never auto increment AssemblyVersion,
and it's a Visual Studio bug that it does this by default.

Also you should use project referneces to the required libraries. This will
help Visual Studio coordinate builds among the dependant projects.

David

Nov 21 '05 #2
In your class libraries do you have AssemblyVersion set to automatically
increment? If so, don't. You should never auto increment
AssemblyVersion, and it's a Visual Studio bug that it does this by
default.


Never auto-increment AssemblyVersion? Where'd you get that idea? We
auto-increment the Assembly version because when you do any kind of build,
the actual binary file is re-written...even if it is exactly the same binary
data that gets written. It isn't "copying" the old binary data, it's
re-building the data. Because of this, it really is a new build/revision.
Therefore, incrementing the build and revision numbers automatically makes
sense. Why would you NOT auto-increment for most projects?

Using project references is only applicable when you are developing the
dependencies yourself. If you have a control you wrote and you want to
include it in different projects that are in different solutions, would you
re-build the control every time you want to place it on one of your forms?
If you wrote many controls, the solution would become much larger than it
would need to be, not only that, for every project that uses the control,
you would have a different build (not build #, but binary build) of the
control. Even if you kept the build/revision numbers the same in all of the
binaries, the date created would change, and it would be a different binary.

Now, for the original poster, try removing the references from the project
and re-adding them in the IDE (if you are developing in a .Net IDE). If
that doesn't work, let us know :)

Mythran

Nov 21 '05 #3
On 2005-09-23, Mythran <ki********@hotmail.comREMOVETRAIL> wrote:
In your class libraries do you have AssemblyVersion set to automatically
increment? If so, don't. You should never auto increment
AssemblyVersion, and it's a Visual Studio bug that it does this by
default.
Never auto-increment AssemblyVersion? Where'd you get that idea? We
auto-increment the Assembly version because when you do any kind of
build, the actual binary file is re-written...even if it is exactly
the same binary data that gets written. It isn't "copying" the old
binary data, it's re-building the data. Because of this, it really is
a new build/revision. Therefore, incrementing the build and revision
numbers automatically makes sense. Why would you NOT auto-increment
for most projects?


Because if the version number of a component changes, you also need to
rebuild all projects that use that component (or do a redirect in
the .config file).

Mind you, I'm not agreeing with the idea of *never* autoincrementing,
but it's often a useful practice to turn it off, especially for
class libraries.
Using project references is only applicable when you are developing
the dependencies yourself. If you have a control you wrote and you
want to include it in different projects that are in different
solutions, would you re-build the control every time you want to place
it on one of your forms?
Good example. Now you've used this control in x number of websites, and
you want to fix a typo in an error message. Do you change the version
number and rebuild the world, or keep the version number and just drop
in the new component into the various bin directories on the release
servers?

If you wrote many controls, the solution
would become much larger than it would need to be, not only that, for
every project that uses the control, you would have a different build
(not build #, but binary build) of the control. Even if you kept the
build/revision numbers the same in all of the binaries, the date
created would change, and it would be a different binary.
This actually isn't such a bad idea in certain situations if you have a
source control system that handles linking projects correctly and a good
automated build system. Eventually, though, I agree you'd want to
lock down the components.

To be honest, I think the whole VS.Net versioning system is incredibly
poorly thought out. What I really want is a way to identify different
builds without breaking compatibility; File version could be useful for
this, but VS won't autoincrement it. Also, true autoincrementing would
be nice, not the weird format VS.Net uses. If they must use a date, why
not a simple epoch time in the revision part? And it should be updated
on every build. I just don't understand the point of an autoincrement
system that doesn't update on every build, that makes no sense to me.

I often think that it would be nice if the CLR would ignore the revision
part when checking for compatibility, but that might be a performance
problem if you get a lot of builds in the cache.


Now, for the original poster, try removing the references from the
project and re-adding them in the IDE (if you are developing in a .Net
IDE). If that doesn't work, let us know :)


I'd add that deleting the obj and bin directories often helps as well.
Nov 21 '05 #4

"david" <da***@woofix.local.dom> wrote in message
news:sl******************@localhost.localdomain...
On 2005-09-23, Mythran <ki********@hotmail.comREMOVETRAIL> wrote:
In your class libraries do you have AssemblyVersion set to automatically
increment? If so, don't. You should never auto increment
AssemblyVersion, and it's a Visual Studio bug that it does this by
default.
Never auto-increment AssemblyVersion? Where'd you get that idea? We
auto-increment the Assembly version because when you do any kind of
build, the actual binary file is re-written...even if it is exactly
the same binary data that gets written. It isn't "copying" the old
binary data, it's re-building the data. Because of this, it really is
a new build/revision. Therefore, incrementing the build and revision
numbers automatically makes sense. Why would you NOT auto-increment
for most projects?


Because if the version number of a component changes, you also need to
rebuild all projects that use that component (or do a redirect in
the .config file).


Not always. If you (not saying you should) put the assembly into the GAC,
you would not have to rebuild. Just use a policy file (which I have never
done).
Mind you, I'm not agreeing with the idea of *never* autoincrementing,
but it's often a useful practice to turn it off, especially for
class libraries.
Using project references is only applicable when you are developing
the dependencies yourself. If you have a control you wrote and you
want to include it in different projects that are in different
solutions, would you re-build the control every time you want to place
it on one of your forms?


Good example. Now you've used this control in x number of websites, and
you want to fix a typo in an error message. Do you change the version
number and rebuild the world, or keep the version number and just drop
in the new component into the various bin directories on the release
servers?


Oh, come on. You don't write perfect code the first time ??? :P
If you wrote many controls, the solution
would become much larger than it would need to be, not only that, for
every project that uses the control, you would have a different build
(not build #, but binary build) of the control. Even if you kept the
build/revision numbers the same in all of the binaries, the date
created would change, and it would be a different binary.


This actually isn't such a bad idea in certain situations if you have a
source control system that handles linking projects correctly and a good
automated build system. Eventually, though, I agree you'd want to
lock down the components.
Now, for the original poster, try removing the references from the
project and re-adding them in the IDE (if you are developing in a .Net
IDE). If that doesn't work, let us know :)


I'd add that deleting the obj and bin directories often helps as well.


Yeah, but if that helps, then you'd probably want to find why deleting the
obj and bin directory helps, and see if there is another reason/problem that
exists...

Mythran

Nov 21 '05 #5

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

Similar topics

4
by: TT (Tom Tempelaere) | last post by:
Hi There, The error message: Error: The dependency 'XXX, Version=1.1.1671.19501, Culture=neutral' in project 'Test' cannot be copied to the run directory because it would conflict with...
5
by: Chris | last post by:
I have a project that I have been messing with for a while. I get a message in my task list that says: "The dependency 'ICSharpCode.SharpZipLib' could not be found." I added this library in a...
9
by: Nak | last post by:
Hi there, I'm getting some strange warnings appearing while I'm compiling a couple of setup projects I have in a solution. I'm being informed of the following warnings, WARNING: Unable to...
5
by: Jay A. Moritz | last post by:
Error: The dependency '<my dll>' in project '<my project>' cannot be copied to the run directory because it would conflict with dependency '<my dll>'. I am getting a dependency error building...
3
by: DJTN | last post by:
I'm getting the following error when I try to compile my setup project in VS 2002. I have re-installed the .net framework 1.1 and it didnt solve the problem. WARNING: Unable to find dependency...
9
by: Brett Romero | last post by:
I have two projects in one solution - a library and executable. Each have a namespace such as: ROOT.myapp.Functional ROOT.myapp.UI However, each cannot reference the other. myapp.UI is...
2
by: Darryl | last post by:
I'm working on converting an A97 DB that someone else wrote to A2K3. It's converted fine, as far as I can see. Now while making changes, I've removed several buttons on a form that called...
0
by: SpockMonster | last post by:
Our solution contains multiple projects, such as: 1 Web project 3 library projects that contain Serviced Components 7 library projects that do not contain Servicded Components Long ago, a...
0
by: schapopa | last post by:
After reinstalling files and changing MS Office from XP to 2003 i have to dependency errors: The dependency 'Microsoft.VBE.Interop' could not be found The dependency 'mscomctl' could not be found....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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
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,...
0
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...

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.