开发者

How to copy Satellite assembly to different folder after build?

I have a WPF project and I have added support for localization using Satellite assembly. I have 2 cultures supported namely en-US and fr-CA.

Now when I build the project, I get 2 folders namely en-US and fr-CA and the corresponding Satellite assemblies in the folder.

The problem is after the project is built, I have to copy the contents of bin/debug folder into a different directory.

To copy the dll's I am using post build event copy /y "$(TargetPath)" "c:\Tem开发者_如何学运维p\Plugins\"

I want the 2 folders en-US and fr-CA also to be copied to "c:\Temp\Plugins\". How do I do it? I dont want to hardcode names like en-US,fr-CA in the post build event because, we are planning to add support for atleast 30 languages !

Is there a generic way in which the Satellite assemblies can be copied to different directory after build ?

**Note: I want only the Satellite assemblies, there might be lot of other files in bin/debug folder which I dont wanna copy !


I don't think there is any other way to do this that adding copy, xcopy och robocopy lines with suitable patterns to the post build events. For some strange reason we actually had to use different copy commands for single files, directories and groups of files as the some of the commands have a hard time handling folders if the target folder structure doesn't exist.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜