如何解决“ MathWorks.MATLAB.NET.Arrays.MWArray”引发异常?

时间:2019-05-10 02:26:02

标签: matlab asp.net-mvc-4

我在asp.net中遇到了matlab的以下错误。

我安装了“ MATLAB Runtime”,并按照说明通过“构建.NET应用程序”

  

https://ww2.mathworks.cn/help/compiler_sdk/gs/create-a-dotnet-application-with-matlab-code.html

当我在VS2019中通过“ IIS Express(Chrome)”运行时,出现以下错误。 enter image description here

并在输出显示中。

  

抛出异常:MWArray.dll中的'System.TypeInitializationException'

     

MWArray.dll中发生了'System.TypeInitializationException'类型的异常,但未在用户代码中处理

     

“ MathWorks.MATLAB.NET.Arrays.MWArray”的类型初始值设定项引发了异常。

当我检查“环境变量”时

enter image description here

当我检查路径时,我发现“ mclmcrrt9_6.dll”

enter image description here

系统信息。

  

VS2019

     

调试平台:x64

     

框架:4.5.2

Web.config的运行时

  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="MWArray" publicKeyToken="E1D84A0DA19DB86F" culture="neutral"/>
                <bindingRedirect oldVersion="0.0.0.0-2.19.0.0" newVersion="2.19.0.0"/>
            </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
        <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
        <bindingRedirect oldVersion="0.0.0.0-5.2.6.0" newVersion="5.2.6.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
        <bindingRedirect oldVersion="0.0.0.0-5.2.6.0" newVersion="5.2.6.0"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>

我该如何解决?预先感谢。

0 个答案:

没有答案