开发者

When c# project add a reference to a c++/clr project, vs2008 seems doesn't copy the latest dll

I have c# project A, an开发者_开发技巧d c++/clr project B, they are under the same solution S. I make A reference B in vs2008 through "add reference" -> "project", however, each time after B is modified and rebuilt, A would not copy the new B's dll into its own "bin" directory. How to fix that problem? A simple method is write post-build event, but is there any direct method in vs2008 can be used to fix that?


Select the reference in the References node and check its Copy Local property in the Properties window. Should be True. Do check the build order and ensure B is always built before A. Should be automatic but you can enforce it by right-clicking A, Project Dependencies. There is otherwise no mechanism by which the build system is aware that the assembly was built with another compiler, it's just a DLL.


Check your output window and see if the project B is really building. If the output window says

Project not selected to build for this solution configuration,

you need to right-click the solution in Solution Explorer -> Configuration Manager -> Check Build for the project. I bet you might have changed your platform and that might have turned off the build of the project.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜