0

我刚刚使用 NuGet 更新了我的 NuGet.core 包,现在我的网站已经损坏。我收到以下错误消息:

Method 'get_IsBindingRedirectSupported' in type 'System.Web.WebPages.Administration.PackageManager.WebProjectSystem' from assembly 'System.Web.WebPages.Administration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.TypeLoadException: Method 'get_IsBindingRedirectSupported' in type 'System.Web.WebPages.Administration.PackageManager.WebProjectSystem' from assembly 'System.Web.WebPages.Administration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation

我猜这与我的 web.config 没有更新有关吗?这是我的配置:

  <runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <dependentAssembly>
    <assemblyIdentity name="NuGet.Core" publicKeyToken="31bf3856ad364e35" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-2.6.40619.9041" newVersion="2.6.40619.9041" />
  </dependentAssembly>
</assemblyBinding>

谢谢,加文

4

2 回答 2

0

我最终重新安装了 Nuget,一切都已排序

于 2013-09-17T15:35:59.327 回答
0

更新 NuGet.Core 后我遇到了同样的错误

http://connect.microsoft.com/VisualStudio/feedback/details/752526/method-get-isbindingredirectsupported-in-type-system-web-webpages-administration-packagemanager-webprojectsystem-from-assembly-system-web-webpages-管理-版本-2-0-0-0-文化中性

通过删除参考中的System.Web.WebPages.Administration并重建解决方案,问题已得到解决。

于 2013-08-23T21:28:57.153 回答