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>
ony1990
December 28, 2011 at 2:36 am
Yopo?
wes onok Cerita Anyar tah?
share Po o ben nambah ilmune ngene iki
ckckckc