小介绍:我正在开发一个.NET CORE 2项目,我需要第三方API,它可用于C#,但正如我正在检查(dotPeek)那样.dll我发现他们使用C++来实现某些功能.环境:VS 2017社区,.NET CORE 2 x86,IIS Express
问题:当我添加引用并构建项目时,除了警告(黄色感叹号)之外我没有收到任何错误但没有解释.当我向使用上述.dll中的类的REST端点发出请求时,我得到了.请注意,其他一切正常.
System.TypeInitializationException: The type initializer for '<Module>' threw an exception. ---> <CrtImplementationDetails>.ModuleLoadException: The C++ module failed to load.
---> System.EntryPointNotFoundException: A library name must be specified in a DllImport attribute applied to non-IJW methods.
at _getFiberPtrId()
at <CrtImplementationDetails>.LanguageSupport._Initialize(LanguageSupport* )
at <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* )
--- End of inner exception stack trace ---
at <CrtImplementationDetails>.ThrowModuleLoadException(String errorMessage, Exception innerException)
at <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* )
at .cctor()
--- End of inner exception stack trace ---
at RFIDAppCore.Controllers.SyncReaderController..ctor()
at lambda_method(Closure …Run Code Online (Sandbox Code Playgroud)