473,379 Members | 1,530 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,379 software developers and data experts.

View DLL Dependencies

I have been having some problems lately where I get the error where it
says that it cannot copy the new DLL b/c it will overwrite a reference
to the old version.

I know why this error happens, but often lately when I fix it, it
doesn't "work".

I have to manually delete dlls, restart VS.Net, close the solution,
stuff like that to get it to work.

Somewhere, something is getting heldup for whatever reason.
Is there any way to take a DLL and find its dependencies? When it says
that there is a reference to DLL XXX.XXX with version 1.123.1233.3211,
where is that information stored?

I tried looking at the DLL in ISDASM and tried looking at the project
file in notepad, but no luck.

How can I find these dependencies?

Nov 22 '05 #1
4 5076
if you have assemblies A, B, and C, and A depends on B and C depends on B
and A, then you can easily get this problem.

A's dependency on B is defined as a dependency on the DLL file, while B's
dependency is a project dependency, so it is updated with each build.

Problem is, when you compile C, it wants to put both A and B into the
project folder, which won't work, because A depends on a different version
of B than C does.

The way to fix this: go through your projects for A, B and C. Drop every
reference and recreate it. If you make a DLL reference somewhere, make the
same reference everywhere. You cannot mix and match.
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"cmay" <cm**@walshgroup.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
I have been having some problems lately where I get the error where it
says that it cannot copy the new DLL b/c it will overwrite a reference
to the old version.

I know why this error happens, but often lately when I fix it, it
doesn't "work".

I have to manually delete dlls, restart VS.Net, close the solution,
stuff like that to get it to work.

Somewhere, something is getting heldup for whatever reason.
Is there any way to take a DLL and find its dependencies? When it says
that there is a reference to DLL XXX.XXX with version 1.123.1233.3211,
where is that information stored?

I tried looking at the DLL in ISDASM and tried looking at the project
file in notepad, but no luck.

How can I find these dependencies?

Nov 22 '05 #2
Yes, I understand why I would get this error, but my problem is that I
fix the issue in VS.Net, but it doesn't take effect like it should.

Basically I have the situation you are describing. I have 3 DLLs (2 of
which depend on the 3rd) which are all referenced by my main project.
From time to time I will update one of the DLLs and forget to rebuild

the others with the new references, and end up with the dependency
errors on the build.

At this point, there is no "fix" that will work 100%.

I rebuild all projects.
I delete all existing DLLs from my components folder.
I re-reference all DLLs.
I delete all the bin folders.
I restart IIS.
I restart VS.Net.
So when I was having this problem last, it kept telling me that there
was a reference to some old version of a DLL, even though I had re-done
all the references for the 3 projects that reference that DLL many
times over.

I wanted to see if I could actually open up the DLLs manually and view
their dependencies, so I could see where the problem was. It has to be
either a) DLLs are not being properly rebuilt w/ their new references,
b) VS.Net is somehow not recognizing that the DLLs have been updated
during the build process.

Nov 22 '05 #3
hB
Maintain the References as a project output. (so it will update upon
the rebuild of independant dlls to the dependant ones).

Else if you dont want the references to be used in the code directly,
then what we did is we removed reference from one of the project.
like
A depends on B.
C depends on A and B.
so we made C depends on A (by removing B's reference)
and output of A and C is kept at the same place / directory (or Say a D
project which needs all). So in that directory-location we always have
the latest version of all the Dlls-assemblies.

---
hB

Nov 22 '05 #4
I have a really odd hunch. May not be anything, but it's easy to check.
http://blogs.msdn.com/nickmalik/arch...21/431206.aspx

Open the project files for each of the projects. Look at the project GUID.
Make sure that all project GUIDs are different.

Like I said... just a hunch.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"cmay" <cm**@walshgroup.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Yes, I understand why I would get this error, but my problem is that I
fix the issue in VS.Net, but it doesn't take effect like it should.

Basically I have the situation you are describing. I have 3 DLLs (2 of
which depend on the 3rd) which are all referenced by my main project.
From time to time I will update one of the DLLs and forget to rebuild

the others with the new references, and end up with the dependency
errors on the build.

At this point, there is no "fix" that will work 100%.

I rebuild all projects.
I delete all existing DLLs from my components folder.
I re-reference all DLLs.
I delete all the bin folders.
I restart IIS.
I restart VS.Net.
So when I was having this problem last, it kept telling me that there
was a reference to some old version of a DLL, even though I had re-done
all the references for the 3 projects that reference that DLL many
times over.

I wanted to see if I could actually open up the DLLs manually and view
their dependencies, so I could see where the problem was. It has to be
either a) DLLs are not being properly rebuilt w/ their new references,
b) VS.Net is somehow not recognizing that the DLLs have been updated
during the build process.

Nov 22 '05 #5

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

Similar topics

3
by: Dan Hartshorn | last post by:
Anybody know if there is a system function that can be used from a stored procedure that determines if a given primary key has existing dependencies? I want to make a check for this and if there...
3
by: Bruce Wilhelm | last post by:
I have a VS2003 solution with 4 projects in it. I am trying to set up the dependencies in the dialog box, but after I close the dialog the dependencies do not change. Is there something that I am...
4
by: cmay | last post by:
I have been having some problems lately where I get the error where it says that it cannot copy the new DLL b/c it will overwrite a reference to the old version. I know why this error happens,...
3
by: Seba | last post by:
For db2 UDB I need to get dependency information for views. What I'm looking for is the tables that have the source information for the view. i.e. : if the following view was defined in my...
1
by: mp | last post by:
Hi, I have problem with project dependencies. I have made new setup application and everything works perfectly on my comp with VS 2003. On another computer with VS 2002 it does not work....
2
by: JT Lovell | last post by:
I have a solution with 5 projects and I need them to build in a particular order. I understand that setting the project dependencies will allow this, but when I go to the Project Dependencies...
7
by: barias | last post by:
Although circular dependencies are something developers should normally avoid, unfortunately they are very easy to create accidentally between classes in a VS project (i.e. circular compile-time...
6
by: =?Utf-8?B?WW9naSBXYXRjaGVy?= | last post by:
Hello, I am using Visual Studio-2003. I created a project to build my library. Since I am using third party libraries as well, I have specified those additional library dependencies in project...
8
by: Scott Sauyet | last post by:
I found myself needing to find my way recursively through a document in XSLT, finding the dependencies one element had on others, and including only those in an initial set, their dependencies, the...
6
by: =?Utf-8?B?YXByMDUyNA==?= | last post by:
I am wondering if there is a devenv switch that will ignore build dependencies that are set in .xxproj files. At the command line I am attempting to build individual projects that I do not want...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?

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.