views:

233

answers:

1

all of the projects in my solution have an output path of "..\Release" for Release builds and "..\Debug" for Debug builds.

All of the projects works fine except for one.

Whenever I build the problematic project in Release the dll that gets copied to "..\Release" comes from "obj\Debug" instead of "obj\Release". This happens both in VS and by manually running MSBuild build, but doesn't happen if I clean the "obj\Debug" folder first.

this is a part of the build log that I think is relevant:

17>Target CopyFilesToOutputDirectory:
17>  Task "Copy"
17>    Copying file from "obj\Release\XXXXX.dll" to "..\Release\XXXXX.dll".
17>    Command:
17>    copy /y "obj\Release\XXXXX.dll" "..\Release\XXXXX.dll"
17>  Done executing task "Copy".
17>  Task "Message"
17>    XXXXX -> C:\Dev\Service\Release\XXXXX.dll
17>  Done executing task "Message".

Any ideas on why would this happen?

A: 

You might want to check the paths against the reference; it might be that you've somehow referenced it against the obj folder. This may be easier to see in the csproj than the IDE ("hint path" or something).

Marc Gravell
I think I didn't explain my self correctly. The dll that's being copied from the wrong folder is the dll of the same project that's being built.The first project I was talking about. was just to shoe that the problem isn't in the solution because some of the projects are ok.
Meidan Alon
actually I ran a search of "\obj\debug" on the build log and found that there was a project with a reference to that path, only then I understood your answer. Thanks.
Meidan Alon