RSS

Konversi visual studio lama ke visual studio 2010

22 Dec

Kadang – kadang nemu masalah,

Sewaktu project C# dikonvert ke visual studio yang baru (kasus saya dari visual studio 2008 ke 2010), akan muncul error yang menyatakan :

Mixed mode assembly is built against version ‘v2.0.50727’ of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.

 

 

Ternyata penyelesainnya cukup mudah, cukup tambahkan baris di bawah ini ke app.config di direktori utama tempat project anda berada :

 

<?xml version=“1.0”?>
<configuration>
 
<startup
useLegacyV2RuntimeActivationPolicy=“true”>
   
<supportedRuntime
version=“v4.0”
sku=“.NETFramework,Version=v4.0”/>
 
</startup>
</configuration>

 

Keterangannya adalah sebagai berikut :

 

One of the recent problems we’ve seen is that, because of the support for side-by-side runtimes, .NET 4.0 has changed the way that it binds to older mixed-mode assemblies. These assemblies are, for example, those that are compiled from C++\CLI. Currently available DirectX assemblies are mixed mode. If you see a message like this then you know you have run into the issue:

Mixed mode assembly is built against version ‘v1.1.4322’ of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.

[Snip]

The good news for applications is that you have the option of falling back to .NET 2.0 era binding for these assemblies by setting an app.config flag like so:

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

 
1 Comment

Posted by on December 22, 2011 in Uncategorized

 

One response to “Konversi visual studio lama ke visual studio 2010

  1. ony1990

    December 28, 2011 at 2:36 am

    Yopo?
    wes onok Cerita Anyar tah?
    share Po o ben nambah ilmune ngene iki
    ckckckc

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: