我已将这些添加到我的项目中。
<Content Include="../../native/medxdcmtk/lib/libmedxdcmtk.so">
<PackagePath>runtimes/debian-x64/native/libmedxdcmtk.so</PackagePath>
<Pack>true</Pack>
</Content>
<Content Include="../../native/dcmtk/lib/libdcmtk.so.10">
<PackagePath>runtimes/debian-x64/native/libdcmtk.so.10</PackagePath>
<Pack>true</Pack>
</Content>
<Content Include="../../native/medxdcmtk/lib/libmedxdcmtk.so">
<PackagePath>runtimes/ubuntu-x64/native/libmedxdcmtk.so</PackagePath>
<Pack>true</Pack>
</Content>
<Content Include="../../native/dcmtk/lib/libdcmtk.so.10">
<PackagePath>runtimes/ubuntu-x64/native/libdcmtk.so.10</PackagePath>
<Pack>true</Pack>
</Content>
生成的包看起来像:
当我调用使用PInvoke
的方法时,我得到了这个:
Error Message:
System.DllNotFoundException : Unable to load DLL 'libmedxdcmtk': The specified module could not be found.
(Exception from HRESULT: 0x8007007E)
这在ubuntu和debian(64bit)上都会发生。如果我将.so
文件直接复制到/usr/lib
,则可以正常工作。
为什么找不到我的原生组件?