Very simple problem.
I have a solution with 3 projects :
Project A is a plain C++ DLL project
Project B is a managed C++ wrapper DLL for project A (it has A as a Reference)
Project C is a C# project usign the managed C++ wrapper (it has B as a
Reference)
Thus, project C depends indirectly from A, but the dependency checker of
VS.NET seems to overlook that because A is a plain C++ DLL.
The result is that project A's DLL is not copied into the output directory
of project C, preventing project C to run properly. If I copy the DLL
manually it works.
Is this a bug of VS.NET ? Is there something I can do to make this work ?
Thanks,
Yannick L.
Ken Varn - 07 Oct 2004 20:20 GMT
I think that only referenced assemblies are copied locally. In order to
copy the unmanaged C++ DLL, you have to copy it manually. I usually do this
by putting in a post build command in the project settings. The post build
command can just copy the required DLL to the location where you need it.
Note that this is not available for ASP.NET apps.
- Right click on the C# project and select properties.
- Select Build Events under Common Properties
- Type the desired Windows command line copy statement into the Post Build
Command Line entry area to copy the DLL over.

Signature
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
EmailID = varnk
Domain = Diebold.com
-----------------------------------
"Yannick L?tourneau" <YannickLtourneau@discussions.microsoft.com> wrote in
message news:F39F4D65-A377-439B-A0A9-855703807994@microsoft.com...
> Very simple problem.
>
[quoted text clipped - 16 lines]
> Thanks,
> Yannick L.