문제

I am trying to integrate Matlab producing dll with my .net project when I call make its object it gives the below error.

Error 1 Could not load file or assembly 'ChordRecognizerDotNETAssemplyForTuning' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

I have installed MCR and frameworks till 4.0 as you can see in pic. please help

enter image description here

도움이 되었습니까?

해결책

Place this in your main projects app.config file

  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>

useLegacyV2RuntimeActivationPolicy should do the trick.

And don't forget to set your target framework to ".NET Framework 4" rather than ".NET Framework 4 Client Profile"

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top