升级到WebGrease版本1.3.0得到我的错误

编程入门 行业动态 更新时间:2024-10-28 14:32:06
本文介绍了升级到WebGrease版本1.3.0得到我的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在升级 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得到我的错误

本文发布于:2023-05-29 23:14:23,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/355178.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:升级到   错误   版本   WebGrease

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!