What is a mixed mode assembly?
我正在查看System.Data.sqlite下载页面,它列出了.NET 4的混合模式程序集和一个常规程序集(我假设)。我要使用这个库的项目是所有.NET 4,它将编译为x86。
我有两个问题:
http://。/en-US /图书馆/ x0w2664k.aspx
1)检查第一allways MSDN。混合模式意味着托管和非托管代码可以运行组装。
2)设置为32位的Windows(.NET Framework 4.0)
system.data.sqlite.org sqlite-netfx40-setup-bundle-x86-2010-1.0.74.0.exe http:/ /
你回答这个问题:"我是自己的项目,这是要使用这个库,这将是所有.NET 4到x86汇编。"
有一个方法来产生一个混合模式的组装的纯IL。在最终的一部分组装使用反射创造的自然assemblybuilder.save A调用。如果你只是portableexecutablekinds.required32bit portableexecutablekind护照的论点然后你要创建一个混合模式的组装。你可以避免这一问题的原因是portableexecutablekinds.ilonly通过传递。IU
1 | assembly_bldr.Save(exe_name, PortableExecutableKinds.Required32Bit | PortableExecutableKinds.ILOnly, ImageFileMachine.I386 ); |
needless说,这个信息是硬韩元。
采取从官方的FAQ
(14) What is a mixed-mode assembly?
A mixed-mode assembly is a dynamic link library that contains both
managed code and native code for a particular processor architecture.
Since it contains native code it can only be loaded into a process
that matches the processor architecture it was compiled for. Also see
this StackOverflow question.
它甚至引用这个问题!
for a束包含SQLite,混合模式为
它是一本在SQLite的FAQ页面。
(15) What is a"bundle" package (i.e. from the download page)?
The"bundle" packages listed on the download page contains the
System.Data.SQLite mixed-mode assembly in a file named
"System.Data.SQLite.dll" (see question #14) instead of separate
"System.Data.SQLite.dll" and"SQLite.Interop.dll" files to contain the
managed code and native code, respectively.
与以前的常见问题:
(14) What is a mixed-mode assembly?
A mixed-mode assembly is a dynamic link library that contains both
managed code and native code for a particular processor architecture.
Since it contains native code it can only be loaded into a process
that matches the processor architecture it was compiled for. Also see
this StackOverflow question.
为什么有两个选项?
基于我的研究是可用的非捆绑的形式,这样你可以使用
你应该检查我的研究,因为我没有任何直接的证据在preceding第。这里是我的研究:
- http://docs.microsoft.com /美国/ CPP / Dotnet /混合本地和托管组件?查看VS = 2019
- http://docs.microsoft.com /美国/ Dotnet CSharp编程指南/ / / /互操作
- http://docs.microsoft.com /美国/ Dotnet CSharp编程/ / / /互通互操作指南综述
- http://visualstudio.uservoice.com /论坛/ 121579 Visual Studio IDE /建议/ 8977675做紧急删除- CLR和CLR的纯C安全从CLI