在 sharePoint 2010 Server 中创建 WebPart 时出现以下错误。
Web 部件错误:部分信任应用程序域中的用户代码包装器的 Execute 方法引发了未处理的异常:System.Web.HttpUnhandledException:引发了“System.Web.HttpUnhandledException”类型的异常。---> System.TypeLoadException:无法从程序集“Microsoft.SharePoint,Version=14.900.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c”加载类型“Microsoft.SharePoint.WebControls.SPGridView”。在 ListMenuSample.ListMenuSample.ListMenuSample.CreateChildControls() 在 System.Web.UI.Control.EnsureChildControls() 在 System.Web.UI.Control.PreRenderRecursiveInternal() 在 System.Web.UI.Control.PreRenderRecursiveInternal() 在 System.Web .UI.Control.PreRenderRecursiveInternal() 在 System.Web.UI.Control.PreRenderRecursiveInternal() 在 System.Web.UI.Page。