How to make MSBuild to automatically copy all indirect references to output (bin) folder

强颜欢笑 提交于 2019-11-27 12:51:34

问题


Subj.

"Automatically" is essential here. References from GAC must not be copied.

I've seen e.g. VS2008.NET: Getting a referenced project’s dependencies to copy to main project’s bin folder, and this isn't interesting for me. I'd like all the dependencies get copied automatically.


回答1:


For C++ projects, i.e. *.vcxproj set the <OutDir> property.

for C# projects, i.e. *.csproj set the <OutputPath> property.

Make sure nothing overwrites those properties. In all my years doing builds for major, large products, I've never had to do anything different. If you have to do any other clever hack, you are surely doing something wrong.




回答2:


use post build event
EDIT

XCOPY c:/additionlib $(OutDir)


来源:https://stackoverflow.com/questions/1425359/how-to-make-msbuild-to-automatically-copy-all-indirect-references-to-output-bin

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