سؤال

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:\Temp\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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top