项目抛出混合模式错误. [英] Project throws error of mixed mode..

查看:54
本文介绍了项目抛出混合模式错误.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

在asp.net的用户控件中运行Crystal Report时,Windows应用程序出现问题.

我遇到了混合模式错误,因此在网络和appcongif中都添加了此错误.

Hi!

I am having a problem in my windows application when I run crystal report in my user control in asp.net.

I was getting mixed mode error I put this in both web and appcongif.

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


添加此内容后,我又遇到了另一个错误.


配置系统初始化失败


After adding this I got another error.


Configuration system failed to initialize

推荐答案

您需要确保配置文件(如果是web则为web.config,如果是web则为app.config Windows)在您的项目中开始为:

You need to make sure that your config file (web.config if web, or app.config if windows) in your project starts as:

<?xml version="1.0"?>
<configuration>
   <configSections>
      <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
      <section name="yourProjectName.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>



请注意,在配置"元素内,第一个子级必须是"configSections"元素.



Please note that inside the "configuration" element, the first child must be the "configSections" element.


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


这篇关于项目抛出混合模式错误.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆