如何使Visual Studio将DLL文件复制到输出目录? [英] How to make Visual Studio copy a DLL file to the output directory?
问题描述
在项目中使用后构建操作,并添加命令以复制违规DLL。 post-build操作是作为批处理脚本编写的。
输出目录可以被引用为 $(OutDir)
。项目目录可以作为 $(ProjDir)
。尝试在适用的情况下使用相对的贴图,以便您可以复制或移动项目文件夹,而不会影响后期制作。
I have a Visual Studio C++ project that relies on an external DLL file. How can I make Visual Studio copy this DLL file automatically into the output directory (debug/release) when I build the project?
Use a post-build action in your project, and add the commands to copy the offending DLL. The post-build action are written as a batch script.
The output directory can be referenced as $(OutDir)
. The project directory is available as $(ProjDir)
. Try to use relative pathes where applicable, so that you can copy or move your project folder without breaking the post-build action.
这篇关于如何使Visual Studio将DLL文件复制到输出目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!