簡體   English   中英

無法從程序集“ System.Reflection,版本= 4.0.0.0,區域性=中性”中加載類型“ System.Reflection.IntrospectionExtensions”

[英]Could not load type 'System.Reflection.IntrospectionExtensions' from assembly 'System.Reflection, Version=4.0.0.0, Culture=neutral

這是我的default.aspx:

<body>
    <form id="form1" runat="server">
    <div>
 <asp:GridView ID="GridView1" runat="server">
    </asp:GridView>

    </div>

    </form>
</body>

我是.net的新手。

當我運行下面的代碼時,它顯示出這樣的錯誤,

無法從程序集“ System.Reflection,版本= 4.0.0.0,區域性=中性,PublicKeyToken = ..”中加載類型“ System.Reflection.IntrospectionExtensions”。

但是我已經添加了system.reflection.dll

仍然顯示錯誤。

誰能幫我解決這個問題?

任何幫助將不勝感激。

提前致謝。

我假設您的目標是一個4.0項目,而IntrospectionExtensions是在4.5中添加的。 如果要將其添加到4.0項目中,則需要Mono版本(該部分是從.NET中打開的,我相信

https://github.com/dotnet/coreclr/blob/master/src/mscorlib/src/System/Reflection/IntrospectionExtensions.cs )。

注意-該名稱空間實際上位於mscorlib中,而不位於System.Reflection庫中。

有一個帖子指向它的Mono部分-因此,如果需要4.0,請嘗試一個或另一個,否則請使用4.5。

.NET 4.0的System.Reflection.IntrospectionExtensions?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM