WebMarkupMin.Mvc 引用更高版本的 Mvc
WebMarkupMin.Mvc referring higher version of Mvc
我在我的一些项目中使用 WebmarkupMin 已经有一段时间了,但是当我今天开始一个新项目时,我遇到了它的版本和 MVC 版本的问题。
我使用的是 .NET MVC 3 和 Visual Studio 2012,我已经在网站上检查了 WebMarkupMin 的版本,没关系,我使用 NuGet 下载了它,已经尝试删除并再次添加它并且没什么。
Assembly 'WebMarkupMin.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=99472178d266584b'
uses 'System.Web.Mvc, Version=3.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
which has a higher version than referenced assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' d:\Jobs em Andamento\Skill2015\packages\WebMarkupMin.Mvc.1.0.0\lib\net40\WebMarkupMin.Mvc.dll
我的 web.config 也有一个程序集绑定,在我安装 WebMarkupMin 之前就已经存在了:
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
</assemblyBinding>
我已经尝试将旧版本更改为 3.0.0.1,但我仍然遇到同样的错误。
我该如何解决?
试试这个:
<bindingRedirect oldVersion="0.0.0.0-3.0.0.1" newVersion="3.0.0.1" />
我的问题是,当我添加第三方库 ( HtmlAgilityPack ) 时,它更改了我 packages.config 中的 Razor dll 版本,在我从项目中删除引用后,更改了版本在 packages.config 上添加了对旧版本的引用,一切正常。
我在我的一些项目中使用 WebmarkupMin 已经有一段时间了,但是当我今天开始一个新项目时,我遇到了它的版本和 MVC 版本的问题。
我使用的是 .NET MVC 3 和 Visual Studio 2012,我已经在网站上检查了 WebMarkupMin 的版本,没关系,我使用 NuGet 下载了它,已经尝试删除并再次添加它并且没什么。
Assembly 'WebMarkupMin.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=99472178d266584b'
uses 'System.Web.Mvc, Version=3.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
which has a higher version than referenced assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' d:\Jobs em Andamento\Skill2015\packages\WebMarkupMin.Mvc.1.0.0\lib\net40\WebMarkupMin.Mvc.dll
我的 web.config 也有一个程序集绑定,在我安装 WebMarkupMin 之前就已经存在了:
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
</assemblyBinding>
我已经尝试将旧版本更改为 3.0.0.1,但我仍然遇到同样的错误。
我该如何解决?
试试这个:
<bindingRedirect oldVersion="0.0.0.0-3.0.0.1" newVersion="3.0.0.1" />
我的问题是,当我添加第三方库 ( HtmlAgilityPack ) 时,它更改了我 packages.config 中的 Razor dll 版本,在我从项目中删除引用后,更改了版本在 packages.config 上添加了对旧版本的引用,一切正常。