升级到WebGrease版本1.3.0得到我的错误 [英] Upgrading WebGrease to version 1.3.0 gets me error
问题描述
在升级 WebGrease
来的版本 1.3.0
让我错误:
While upgrading WebGrease
to version 1.3.0
gets me error:
无法加载文件或程序集WebGrease,版本= 1.0.0.0,文化=中性公钥= 31bf3856ad364e35或它的一个依赖。找到的程序集清单定义不匹配程序集引用。 (异常来自HRESULT:0x80131040)
Could not load file or assembly 'WebGrease, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
源错误:
Line 6: <title>@ViewBag.Title</title>
Line 7: @Styles.Render("~/Content/bundles/bootstrap")
如何解决这个错误。
How to resolve this error.
推荐答案
下面是为我工作的答案,这是上面的一些答案的组合。
首先安装/卸载/重新安装以下软件包:
Here is the answer that has worked for me, and it is a combination of some of the above answers. First install / uninstall / reinstall the following packages:
Install-Package Microsoft.AspNet.Web.Optimization
Update-Package WebGrease
Uninstall-Package Microsoft.AspNet.Web.Optimization
Uninstall-Package WebGrease
Install-Package Microsoft.AspNet.Web.Optimization
Update-Package WebGrease
然后进行的〜/查看/共享/ _Layout.cshtml内容的副本
删除文件_Layout.cshtml,重新创建它,并在内容粘贴回来。
Then make a copy of the contents of ~/Views/Shared/_Layout.cshtml delete the _Layout.cshtml file, recreate it and paste the contents back in.
这是为我工作的最终修复。
this is the final fix that has worked for me.
这篇关于升级到WebGrease版本1.3.0得到我的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!