当前位置:编程学习 > C#/ASP.NET >>

vb6.0中使用vb.net dll 混合程序集错误

错误


 我已经在vb.net工程中app.config中加入了,
 <startup useLegacyV2RuntimeActivationPolicy="true">
     <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
 </startup>
请大虾们帮忙

<?xml version="1.0" encoding="utf-8" ?>
 <configuration>
   <startup useLegacyV2RuntimeActivationPolicy="true">
     <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
   </startup>
     <system.diagnostics>
         <sources>
             <!-- This section defines the logging configuration for My.Application.Log -->
             <source name="DefaultSource" switchName="DefaultSwitch">
                 <listeners>
                     <add name="FileLog"/>
                     <!-- Uncomment the below section to write to the Application Event Log -->
                     <!--<add name="EventLog"/>-->
                 </listeners>
             </source>
         </sources>
         <switches>
             <add name="DefaultSwitch" value="Information" />
         </switches>
         <sharedListeners>
             <add name="FileLog"
                  type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" 
                  initializeData="FileLogWriter"/>
             <!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to the Application Event Log -->
             <!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
         </sharedListeners>
     </system.diagnostics>
 </configuration> --------------------编程问答-------------------- vb6.0不兼容 vb.net吧 --------------------编程问答--------------------
引用 1 楼 hunter103 的回复:
vb6.0不兼容 vb.net吧

用一般的控件都没有问题,但是用到需要framework支持的就报错了 --------------------编程问答--------------------
引用 2 楼 winstonshi 的回复:
Quote: 引用 1 楼 hunter103 的回复:

vb6.0不兼容 vb.net吧

用一般的控件都没有问题,但是用到需要framework支持的就报错了

vb6.0不兼容vb.net,所以不行。 --------------------编程问答-------------------- 这个混合程序集的错误就是因为不兼容产生的么?
感觉上只是framework版本的问题啊 --------------------编程问答-------------------- 已经解决
谢谢大家的帮忙 --------------------编程问答-------------------- 是啊,看提示感觉也是版本问题,要不你把4.0换成2.0试试? --------------------编程问答--------------------
引用 6 楼 vb763305825 的回复:
是啊,看提示感觉也是版本问题,要不你把4.0换成2.0试试?

虽然你说晚了,但是你说的是对的.分数就送你啦
补充:.NET技术 ,  组件/控件开发
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,