且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

“无法加载文件或程序集或其依赖项之一.试图加载格式不正确的程序."

更新时间:2023-11-07 23:42:58

最可能的原因是p4dn.dll不是托管程序集,因此您试图以此方式加载它.您可能需要改为通过DLLImport语句访问文件.
The most likely reason is the p4dn.dll is not a managed assembly, and you are trying to load it as such. You probably need to access the file via DLLImport statements instead.