How to pull output (.dll) from one project to another?

白昼怎懂夜的黑 提交于 2019-12-11 18:44:17

问题


As the part of a bigger solution, I have two projects.

One is c++ library packed as a DLL, and other is .NET wrapper for it.

What would be the best way to indicate to Visual Studio that output DLL from first project is to be pulled into the destination folder of second project, and more: for projects that use wrapper, will they pick up also the DLL from the first one.

I could do it with post-build steps, but I'm after something more sophisticated. Is that possible?

EDIT: we could also ask: "How to add unmanaged reference?"


回答1:


I guess I found a solution, that might be satisfying...

Steps:

  • in wrapper project, I'll add a DLL that is now present in the output directory of the LIBRARY. Any configuration will do.
  • Pre-build step for the wrapper project should COPY output of the library that is currently configured to be built into the source directory directly
  • option for the file will be 'do not build' and 'copy to output directory if newer'
  • in version control, that file will be IGNORED by version control (I use svn, hope it's possible in others as well).


来源:https://stackoverflow.com/questions/11527778/how-to-pull-output-dll-from-one-project-to-another

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!