项目从Visual Studio 2013 升级到 2015 后出现错误解决方案
来源:互联网 发布:城野医生洗面奶 知乎 编辑:程序博客网 时间:2024/04/30 00:36
项目从Visual Studio 2013 升级到 2015 后出现错误解决方案
升级到VS2015后,Clear, 从新编译后,出现错误
Description: An exception occurred while processing your request. Additionally, another exception occurred while executing the custom error page for the first exception. The request has been terminated.
解决方案:
1. 修改 Web.config
<customErrors mode="Off" >
编译运行,出现错误
Error: Attempt by security transparent method 'WebMatrix.WebData.PreApplicationStartCode.Start()' to access security critical method 'System.Web.WebPages.Razor.WebPageRazorHost.AddGlobalImport(System.String)' failed.
2. 安装程序包
再编译,出现新错误
Error:Could not load file or assembly 'WebMatrix.Data, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference
3. 再安装程序包
Tools > NuGet Package Manager > Package Manager Console
PM> Install-Package Microsoft.AspNet.WebPages.Data
再编译,运行正常,
升级到VS2015后,Clear, 从新编译后,出现错误
Description: An exception occurred while processing your request. Additionally, another exception occurred while executing the custom error page for the first exception. The request has been terminated.
解决方案:
1. 修改 Web.config
<customErrors mode="Off" >
编译运行,出现错误
Error: Attempt by security transparent method 'WebMatrix.WebData.PreApplicationStartCode.Start()' to access security critical method 'System.Web.WebPages.Razor.WebPageRazorHost.AddGlobalImport(System.String)' failed.
2. 安装程序包
View -> Others windows -> Package Manager Console 或者 Tools > NuGet Package Manager > Package Manager Console
PM> Install-Package Microsoft.AspNet.WebHelpers再编译,出现新错误
Error:Could not load file or assembly 'WebMatrix.Data, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference
3. 再安装程序包
Tools > NuGet Package Manager > Package Manager Console
PM> Install-Package Microsoft.AspNet.WebPages.Data
再编译,运行正常,
4. 修改Web.config <customErrors mode="On" >
总结:
当项目升级到VS 2015. 若出现WebMatrix的错误,需要安装以下两个程序包:
Microsoft.AspNet.WebHelpersMicrosoft.AspNet.WebPages.Data
0 0
- 项目从Visual Studio 2013 升级到 2015 后出现错误解决方案
- Visual Studio从2010升级到2012或2013后,打开Opencv相关项目可能出现的问题
- Visual Studio 2015 升级到Update 3后Unreal无法编译的解决方案
- 从Windows到Mac迁移Android项目出现错误解决方案
- Visual Studio Setup 项目 - 程序的.net framework升级后遇到的安装错误
- Android Studio升级到2.3版本后出现gradle解压错误
- 如何从Visual Studio Tools for Office升级解决方案
- 在导入eclipse项目到Android Studio出现这样的错误, 非法字符: '\ufeff' 解决方案|错误: 需要class, interface或enum,查阅后了解到Eclipse可以智
- 升级 IE8 导致 Visual Studio 错误的解决方案
- Visual Studio 2010安装后出现“未能初始化‘新建项目’”错误
- jdk升级到1.7后,打开以前的android项目出现错误
- Visual Studio 2010 出现关于ActivityLog.xml错误的解决方案
- 开启Visual Studio 2010时出现的加载错误解决方案
- Visual Studio 2012 出现关于ActivityLog.xml错误的解决方案
- Visual Studio 2010 出现关于ActivityLog.xml错误的解决方案
- Visual Studio 出现关于ActivityLog.xml错误的解决方案
- Visual Studio 2010 出现关于ActivityLog.xml错误的解决方案
- 升级10.10 Yosemite 后,cocoapods 出现错误(解决方案)
- 如何用腾讯云打造一款微视频APP
- Swift3.0语言教程查找字符集和子字符串
- 优秀开源项目之一:流媒体直播系统Open Broadcaster Software
- 2.1 :java能不能自己写一个类叫java.lang.System/String正确答案
- 警告对话框
- 项目从Visual Studio 2013 升级到 2015 后出现错误解决方案
- 浅谈全区全服架构的SNS游戏后台
- 微信小程序来啦
- Android xml解析之Sax
- 象棋军师app已经上线
- 【Flex】去除外边框,底背景透明,改变exe的icon
- System.Web.HttpRequestValidationException: 从客户端(XML="<?xml version=\"1.0\...")中检测到
- 最常用的 Swift 开源库
- 【MyEclipse安装配置教程】一、安装JDK并配置环境变量