您的位置:首页 > 产品设计 > UI/UE

Mixed mode assembly is built against version 'v1.1.4322' of the runtime and...问题——C# DirectXSound

2012-11-27 20:38 726 查看
1.问题描述:现在.NET版本一般是4.0,本人在编译低版本的.NET程序在4.0上运行时出现了“Mixed mode assembly is built against version 'v1.1.4322' of the runtime and......”错误——具体是这样的,运行程序没有任何反应,Debug的时候报这个错误。
      2.解决方案:对于这个问题,Microsoft的说法是:http://blogs.msdn.com/b/jomo_fisher/archive/2009/11/17/f-scripting-net-4-0-and-mixed-mode-assemblies.aspx,文中已经提到了解决方案:

      在App.config文件中添加如下内容:

[html]
view plaincopy

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

      3.解决方案续:什么?!App.config文件在哪?这里说了:C#配置App.config
      简言之如下:

      右击项目名称,选择“添加”→“添加新建项”,在出现的“添加新项”对话框中,选择“添加应用程序配置文件”;如果项目以前没有配置文件,则默认的文件名称为“app.config”,单击“确定”。出现在设计器视图中的app.config文件为:

[html]
view plaincopy

<?xmlversionxmlversion="1.0"encoding="utf-8" ?>  
<configuration>  
</configuration>  

      将要添加的内容加到<configuration> 与 </configuration>之间就可以了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐