开发者

How to load satellite assemblies relative to DLL

开发者 https://www.devze.com 2023-04-01 09:01 出处:网络
I have a situation where I supply a plugin DLL that uses .NET 4.0. This DLL uses ResourceManager to load strings. The strings in turn get translated and compiled into satellite assemblies.

I have a situation where I supply a plugin DLL that uses .NET 4.0. This DLL uses ResourceManager to load strings. The strings in turn get translated and compiled into satellite assemblies.

I'm not the author of the main EXE that loads and uses my plugin DLL. It's running from another directory. Because of this, the DLL cannot find its satellite assemblies. ResourceManager wants to find them under the EXE directory rather than the directory in which the DLL sits.

How can I get the ResourceM开发者_Python百科anager to load satellite assemblies relative to the DLL?


If the main exe reads settings from a configuration file that you're allowed to change you could use the <codeBase> tag there as described here.

0

精彩评论

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