2

When building my WPF application all internationalization/locale folders are put inside the folder of the executable.

/MyApp
/MyApp/de
/MyApp/fr
/MyApp/otherSpecialFolder
/MyApp/...

The problem is that this mixes up with some other folders. Is it possible to put the internationalization into a separate folder and let the Wpf app search there instead? For example:

/MyApp
/MyApp/i18n/de
/MyApp/i18n/fr
/MyApp/otherSpecialFolder
/MyApp/...

This problem occurs not only for own localization ressources but also when adding thirdparty controls like Xceed.Wpf.AvalonDock.

1 Answer 1

1

Yes you can. You just have to add probing element into your App.config.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <probing privatePath="i18n"/>
    </assemblyBinding>
  </runtime>

  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
  </startup>
</configuration>

probing element specifies the path where assemblies are searched for.

1
  • Is it also possible to say that the dependency assemblies should "copy" their dlls there? Jan 7, 2015 at 17:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.