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

.问题描述:现在.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文件中添加如下内容:

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

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

 

      简言之如下:

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

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

  将要添加的内容加到<configuration> 与 </configuration>之间就可以了。

 

 

来源:http://blog.csdn.net/woaixiaozhe/article/details/7864391

posted @ 2013-02-02 17:08  luoshupeng  阅读(508)  评论(0编辑  收藏  举报