简体   繁体   English

如何在 VS 中设置后期构建事件以复制所有附属程序集

[英]how to set post build event in VS to copy all satellite assemblies

bin文件夹内容

Is there a generic way I could write a post-build event in VS 2017 to copy all satellite assembly folders to another directory?有没有一种通用的方法可以在 VS 2017 中编写构建后事件以将所有附属程序集文件夹复制到另一个目录? Each folder contains a library named [assemblyname].resources.dll每个文件夹都包含一个名为 [assemblyname].resources.dll 的库

I have 8 different configurations, all have the same set of these folders (the number of cultures will increase over time).我有 8 种不同的配置,所有这些文件夹都具有相同的一组(文化的数量会随着时间的推移而增加)。 This is why I'd prefer a generic way over hard-coding every file in the post-build macro.这就是为什么我更喜欢通用方式而不是对构建后宏中的每个文件进行硬编码。

PS: As I wrote this I figured out I could write a separate app to do this, but maybe still there is a way to code it inside post-build event? PS:在我写这篇文章时,我发现我可以编写一个单独的应用程序来做到这一点,但也许仍然有一种方法可以在构建后事件中对其进行编码?

您可以在构建后脚本中使用XCOPY命令。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM