PDA

View Full Version : سوال: توضیح در مورد Mixed mode assembly



ahrimaneahurai
جمعه 26 آذر 1389, 19:52 عصر
سلام
دوستان من به خطای

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.
برخوردم تو گوگل که گشتم نوشته بود باید تو فایل app.config خطوط زیر رو اضافه کرد.

<startup>
<supportedRuntime version="v2.0.50727"/>
</startup>

حالا سوال من اینه :
مگه runtime بالاتر runtime ورژن پایین تر رو ساپورت نمی کنه ؟ اگه آره که این خطا برای چی هست اما اگه نه چرا نه ؟

ahrimaneahurai
جمعه 26 آذر 1389, 20:01 عصر
حالا که کدای بالا رو وارد کردم خطای زیر رو میده


Could not load file or assembly 'myapp.exe' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

hidden.nobody
دوشنبه 29 آذر 1389, 11:49 صبح
سلام.
از gacutils برای ثبت اسمبلیت استفاده می کنی؟ اگه اینطور هست از gacutils ای استفاده می کنی که برای ورژن پایینتر از 4 ساخته شده.
This error is given by the gacutil.exe if you try to register in GAC an assembly built with Framework 4.0 and you are using the gacutil.exe built for Framework 2.0.

http://community.dotnetwork.it/Excentric/archive/2010/06/18/this-assembly-is-built-by-a-runtime-newer-than-the.aspx