Multiple Projects in a Solution - Can't copy dll to run directory!

G

Guest

I have a solution that has multiple projects, one of which is a user control
I call MultiEditControl. I have set the reference in my main project to
MultiEditcontrol dll in the bin directory of the MultiEditControl directory.
Whenever I change this control in my solution, I get the following message.
I've tried deleting the duplicate dll in my overall solution bin directory
but still get the message. What do I have set wrong. I have other projects
within my solution which I do the same for and they don't give me this
message.

Warning: The(dependency) 'MultiEditControl, Version=1.0.1940.27993,
Culture=neutral' in project 'Music Librarian' cannot be copied to the run
directory because it would overwrite the reference 'MultiEditControl,
Version=1.0.1940.28027, Culture=neutral'.
 
R

Ray Cassick \(Home\)

Try setting the reference in the main project to the control project, not
the actual control dll file. That way, when you make changes, the control
will be built then copied to the main project as a dependent object.

Setting the reference to the actual file kind of creates a dependency on
that specific version of the file. When you rebuild the control that version
number changes and you are seeing the main project complain about it because
the version numbers don't match.

I guess if you wanted to use explicit file references you could lock down
the version number in the control project. That would mean that you would
need to manually increment it when you really want it to change. But I
always like using project references better in cases like this.
 
G

Guest

Thanks..this fixed it. I had set the other projects in the solution to the
projects but guess I inadvertently set this one to the .dll file in it's
project bin directory.
 

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