环境

项目中使用了 System.Web.WebPages.Razor, Version=3.0.0.0,Nuget 还原缺失包后自动更新至 Version=3.2.5.0,编译成功,运行失败。

错误

“/”应用程序中的服务器错误。
未能加载文件或程序集“System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”或它的某一个依赖项。系统找不到指定的文件。

解决

方法1:在 Nuget 包管理器中重新安装对应版本。
方法2:在程序包管理器控制台中重新安装对应版本:
Update-Package –reinstall Microsoft.AspNet.WebPages

补充

Reinstall Microsoft.AspNet.WebPages nuget packages using this command in the package manager console. 100% work!!

参考资料

https://stackoverflow.com/a/34923294

[Nuget] - "Runtime error: Could not load file or assembly 'System.Web.WebPages.Razor, Version=3.0.0.0'" 问题之解决的更多相关文章

  1. ASP.NET MV3 部署网站 报"Could not load file or assembly ' System.Web.Helpers “ 错的解决方法

    转自:http://www.cnblogs.com/taven/archive/2011/08/14/2138077.html 国内很多网站空间都只支持.NET 2.0 和 .NET 3.0 3.5, ...

  2. Could not load file or assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

    提示哪个引用修改哪个引用的属性: Could not load file or assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, ...

  3. Could not load file or assembly 'System.Web.Mvc, Version=5.2.3.0...

    一.在Mvc 发布时出现如下错误: Could not load file or assembly 'System.Web.Mvc, Version=5.2.3.0... 出现错误的原因是 Mvc版本 ...

  4. ex:Could not load file or assembly 'System.Web.Helpers, Version=2.0.0.0, Culture=neutral, . 系统找不到指定的文件。

    今天写的是一个小程序,采用webfrom 形式,.netframework4.0 项目中调用了System.Web.Helpers下的Json方法. 在本地测试没问题,结果搭建到服务器上,死活运行不正 ...

  5. MVC4 部署 could not load file or assembly system.web.http.webhost 或是其它文件出误

    自从VS2010发布之后使用它来做开发的程序员越来越多,其中很多人使用了MVC来作为新的开发框架,但是在系统部署的时候我们也遇到诸多问题,因为目前大多数windows服务器采用的还是Windows S ...

  6. Could not load file or assembly 'System.Web.Http

    使用FusLogVw https://stackoverflow.com/questions/4469929/could-not-load-file-or-assembly-or-one-of-its ...

  7. Could not load file or assembly 'System.Web.Mvc' or one of its dependencies. The located assembly's manifest definition does not

    因为用了MVC,在本地是没有问题的,但是部署在服务器就出现了这个问题. 出错界面如下图 原因分析:上面的出错提示最后一句话翻译过来.找到的程序集清单定义与程序集引用不匹配.也就是程序引用的程序集版本和 ...

  8. could not load file or assembly "System.Web.Mvc...

    1.一般出现这个错误是因为Web.Config里面的版本号跟project用到的dll版本对应不上 更改webconfig <add assembly="System.Web.Mvc, ...

  9. Could not load file or assembly 'System.ServiceModel.DomainServices.Hosting'.系统找不到指定文件

    项目部署到服务器后出现如下错误信息: Parser Error Message: Could not load file or assembly 'System.ServiceModel.Domain ...

随机推荐

  1. 数据结构Java版之红黑树(八)

    红黑树是一种自动平衡的二叉查找树,因为存在红黑规则,所以有效的防止了二叉树退化成了链表,且查找和删除的速度都很快,时间复杂度为log(n). 什么是红黑规则? 1.根节点必须是黑色的. 2.节点颜色要 ...

  2. 第一步,怎么打开react的大门?

    前言 其实我的react的实战经验很少,大概是17年-18年写了一个react全家桶的后台管理系统.猜测这个项目应该还一直在使用 在我手里的vue项目就比较多了,技术栈一直是vue全家桶.最近也在深入 ...

  3. 康哲20191114-1 每周例行报告kz404

    此作业的要求参见https://edu.cnblogs.com/campus/nenu/2019fall/homework/10004 本周PSP  本周进度条  本周折线图  饼状图

  4. Linux创建内存磁盘空间

    mount -t tmpfs -o size=20k tmpfs /var/iot/ 修改 /etc/fstab 启动自动mount tmpfs /var/iot tmpfs defaults,siz ...

  5. Java-Maven(十):Maven 项目常用plugins

    本文主要总结最近一段时间使用maven时,遇到需要maven plugins的一些简单总结. 1)在Build下重新指定最终打包报名 <build> <!--最终打包的包名,如果这里 ...

  6. Mysql| 组合where子句过滤数据(AND,OR,IN,NOT)

    ysql 允许使用多个where子句,组合where子句允许使用两种方式使用:AND 和OR子句的方式使用.数据库中的操作符号:AND , OR , IN , NOT. AND:SELECT * FR ...

  7. Windows 开始 运行中所打开的默认程序以及优先级

    Windows 开始 运行中所打开的默认程序以及优先级 Default app/softwares and priority for Windows/start/run 商务合作,科技咨询,版权转让: ...

  8. Flutter -------- Http库 网络请求封装(HttpController)

    http库 再次封装的网络请求类 HttpController 1.添加依赖 dependencies: http: ^0.12.0 #latest version 2.导入库 import 'pac ...

  9. 算法习题---4-7RAID技术(UV509)

    一:题目 (一)基础知识补充(RAID和奇偶校验) 磁盘管理—磁盘阵列(RAID)实例详解(本题目常用RAID 5技术实现) 奇偶校验(同行数据中同位上的1的个数,偶校验时:1的个数为偶数则校验结果为 ...

  10. Glide升级到4.x版本遇到的问题

    Failed to find GeneratedAppGlideModule. You should include an annotationProcessor compile dependency ...