App.config dllmap条目的可移植性 [英] App.config dllmap entry portability

查看:492
本文介绍了App.config dllmap条目的可移植性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

dllmap配置文件条目用于Mono将Windows DLL的请求映射到Linux(.so)库。但是似乎如果Microsoft的.NET框架试图解析配置文件与这样的条目,错误发生,因为它不理解dllmap。我认为我的发行版中的一切都可以在Linux和Windows XP上不变地分发。在这一切涉及的所有可移植性,这个配置项目真的是垮台 - 一个非便携片?

The dllmap configuration file entry is used in Mono to map requests for windows DLLs to Linux (.so) libraries. But it seems that if Microsoft's .NET framework tries to parse a configuration file with such an entry, an error occurs because it doesn't understand "dllmap". I think everything else in my distribution can be distributed unchanged on both Linux and Windows XP. Of all the portability involved in this, is this configuration entry really the downfall -- the one non-portable piece? Isn't there a way to share this file across platforms too?

推荐答案

您确定需要使用dllmap条目吗?你不能只依靠自动映射somelibrary到Windows上的somelibrary.dll和Linux上的somelibrary.so?

Are you sure you need the "dllmap" entries? Can't you just rely on automatic mapping "somelibrary" to "somelibrary.dll" on Windows and "somelibrary.so" on Linux?

只是跳过它不期望的条目...

Besides, I though the framework just skip the entries it does not expect...

编辑:发送linux库的标准方法是有一个无版本的符号链接指向最新版本。因此,您可以添加 libfmodex.so 指向 libfmodex-4.22.01.so 。然后使用 [DllImport(fmodex)] ,框架将自动计算其余部分。

The standard way to ship linux libraries is to have an version-less symlink pointing to the latest version. So you would add libfmodex.so pointing to libfmodex-4.22.01.so. Then use [DllImport("fmodex")] and the framework will figure the rest automatically.

这篇关于App.config dllmap条目的可移植性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆