Mixed mode assembly is built against version ‘v1.1.4322′ of the runtime and…問題——C#

來源:互聯網
上載者:User

.問題描述:現在.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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.