I have a somehow strange problem.
I have a VS2010 C++ solution for two DLLs and a different solution for the application, which uses the two DLLs. Up to now on changes to the DLLs you had to copy them by hand to the appropriate directory of the application.
I introduced now a post build event to copy the changed DLLs automatically on each build.
copy $(TargetDir)$(TargetName).lib ..\..\lib\AppDir\$(TargetName).lib
copy $(TargetPath) ..\..\AppBinDir\$(TargetFileName)
copy $(TargetDir)$(TargetName).pdb ..\..\AppBinDir\$(TargetFileName)
When I try to launch the application after a build of the DLLs I get an “Invalid Image” error and the explanation that something might not be suited for Windows. If I open the DLL with DependencyWalker I get the error “No DOS or PE signature found”.
If I copy the DLLs manually, everything works fine. So I assume there’s a problem with the copy operation in the post build.
This line overrides Dll with pdb file. Possibly you want something like this: