开发者

Mixed mode assembly issue in a class library

I have a common problem with a unique twist. I am running VS2010 and using a cluster 开发者_StackOverflowof 3rd party DLLs that must have been compiled in a previous framework. Of course I get the following error:

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.

I've solved the issue before with these DLLs in a Windows Forms Application by adding the following to an app.config file:

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

My problem now is that I wish to use these DLLs in a Class Library project that can then be called by a windows service. Unfortunately class libraries don't use app.config files. I've scoured Google for hours and haven't been able to find a useful solution, so any assistance would be very appreciated.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜