Skip to content

Instantly share code, notes, and snippets.

@songzheng45
Last active September 12, 2018 06:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save songzheng45/bc4ff3eff8ccd820218f2cf51d66cd92 to your computer and use it in GitHub Desktop.
Save songzheng45/bc4ff3eff8ccd820218f2cf51d66cd92 to your computer and use it in GitHub Desktop.
VS Copy External dlls to output directory

Visual Studio 如何将 WIN32 dll 复制到输出目录?

打开项目属性,选择“Build Events”,在“编译前事件命令行”文本框中输入以下命令(假设外部dll放在项目根目录下的 ExternalDlls 目录下):

xcopy /y /d "$(ProjectDir)ExternalDlls\*.dll" "$(ProjectDir)$(OutDir)"

参数说明:

$(ProjectDir) : 项目所在目录
$(OutDir) : 编译后输出目录

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment