Visual Studio 中的构建后事件有任何标准吗?
我正在开发一个 VS 解决方案,它利用构建后事件将文件复制到打包文件的部署项目中。有谁知道如何移动文件以放置在 MSI 中是否有任何最佳实践?
I am working on a VS solution that utilizes the post-build events to copy files into a deployment project that packages the files. Does anyone know if there is any best practice in how to move files around to place in an MSI?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
只要您确定您的软件包中不再需要最新版本构建的其他内容,就可以了。但是,如果您想为“重新打包”场景做好准备,例如,可以选择轻松交换现有包中的单个文件,则应该考虑将构建过程与“复制到部署项目”过程分开。
As long as you are sure that you never want something else that the latest release build in your package, you are fine. But if you want to be prepared for "repackaging" scenarios, for example, to have an option for easily exchanging a single file in an existing package, you should consider to separate the build process from the "copy to the deployment project" process.
只要复制所有 dll、exe、帮助文件、图标文件、资源(但不包括 .pdb),就可以了。
为什么没有pdb?因为pdb是调试文件,它是为了调试目的而存在的。因此,在您的发布版本中,您不需要它们。
As long as you copy all the dlls, exes, help files, icon files, resources ( but not .pdb), you are OK.
Why no pdb? Because pdb is debugging file, and it is there for debugging purpose. So in your release build, you don't need to have them.