Problem with dependency conflicts

D

DCraig

We're having a problem with one of the projects that was recently added to
our solution. The project, even though it doesn't seem to have a reference
to the dll, generates a series of error messages when you compile it:

Error: The dependency 'ClioControls, Version=1.0.1847.16599,
Culture=neutral' in project 'ClioMain' cannot be copied to the run directory
because it would conflict with dependency 'ClioControls,
Version=1.0.1847.24066, Culture=neutral'.
Error: The dependency 'ClioControls, Version=1.0.1847.24066,
Culture=neutral' in project 'ClioMain' cannot be copied to the run directory
because it would conflict with dependency 'ClioControls,
Version=1.0.1847.16599, Culture=neutral'.

Unable to write to output file
'C:\SerialsSystem\ClioMain\ClioControls\obj\Debug\ClioControls.dll': The
process cannot access the file because it is being used by another process.

I think I understand what's going on, in that the machine has references to
two versions of the dll. What I don't understand it how to fix it. I found
a reference that says you can get around it by going into release mode, but
we have a lot more work to do so we need debug capabilities.

We're using VS 2003, a mix of W2K and WXP clients and W2K Server, also
Visual Source Safe the most recent version.

Has anyone seen this and know how to resolve it? Any help or direction to
relevant documentation is welcome,

Thanks in advance,

David Craig.
 
N

Naveen K Kohli

Your application has reference to different version of the same assembly
DLL. To fix this issue, you will have to remove the reference to these
assemblies from the project and add them again. This will clean up MANIFEST
and reference to newer versions will be set.

the issue with "Unable to write output file" could be that that this
assembly is more than 64K size and is being referenced by one of your
projects. IDE caches the reference to larger assemblies. And it created
trouble at compile time. This is a known bug in IDE.

For dependency check, you download the following utility and see the
results.

http://www.netomatix.com/Development/DependsNet.aspx

Naveen Kohli
http://www.netomatix.com
 
D

DCraig

I went through and deleted all the old copies of the dll before reading your
reply, it's designed to be used by all the projects in the solution so there
was a copy in each, some were the older and some the newer version. When I
tried to delete one of them Windows claimed it was being used by another
process, I shut down VS and it deleted without problems. Those two things
seemed to do the trick - I believe (or hope) this would accomplish the same
thing as deleting the reference since it would have to get the latest
version to compile.

I will download the utility and keep a link to your website in case it
happens again, many thanks for the help.

David Craig.
 
D

DCraig

In case anyone follows this thread: deleting the copies from the solutions
worked temporarily, the next day the problem resurrected itself. I went
through and did as suggested, finding each reference to the older dll,
deleting it and then adding a reference to the new version. That fixed it
for good.

In this case, the "unable to write" error was associated with the other
errors, so it was probably not the assembly > 64k problem.

DCraig.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top