Issue passing .NET object from VB6 to .NET

风流意气都作罢 提交于 2019-12-01 13:28:15
froque

You problem is the different NET versions as you said.

In version 4 , the NET team introduced the In-Process Side-by-Side Execution

With this you can have different versions of the CLR running in your application.

But that is not what you want, so I think you should turn this feature off, using an app.config file:

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

Please note, that while you are using the VB6 IDE, the process that requires an app.config is the VB6.exe, so I would also copy that app.config to the VB6 folder and renamed it as VB6.exe.config. See this answer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!