开发者

FileLoadException with .NET 4

开发者 https://www.devze.com 2023-01-06 03:09 出处:网络
I\'m trying to build an application using the OpenNURBS toolkit (see here) and I\'m getting a FileLoadException with the following message while debugging:

I'm trying to build an application using the OpenNURBS toolkit (see here) and I'm getting a FileLoadException with the following message while debugging:

Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.

The OpenNURBS toolkit is the only non-System assembly in the project at this point, so I know the problem is with that file. Where and what are these supposed configuration options? Any hel开发者_StackOverflow社区p would be appreciated.


You need to add the following config to the app.config file:

<configuration>
    <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0"/>
    </startup>
</configuration>

For details:

<startup> Element @ MSDN

0

精彩评论

暂无评论...
验证码 换一张
取 消