the schema version of 'microsoft.aspnet.mvc' is incompatible with version of nuget
Nuget versioning issue with package restore
http://stackoverflow.com/questions/12035976/nuget-versioning-issue-with-package-restore
Restart VS as administrator, extension manager uninstall nuget. restart VS as administrator again, search for nuget and install.
Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0
http://stackoverflow.com/questions/11000506/could-not-load-file-or-assembly-system-web-webpages-razor-version-2-0-0-0
Getting ASP.NET MVC 3 working on DiscountASP.net
http://joel.net/getting-asp.net-mvc-3-working-on-discountasp.net
在web application中引用了另一個公共的project,裏面更新了MVC dll的版本,結果舊的solution就編譯通不過了
1.首先重新安裝nuget,解決了上面的錯誤
2.接著報錯說web application使用的system.web.mvc.dll版本為3.0.0.0,而引用的project裏面版本時3.0.0.1,不能比引用的project版本更舊
我嘗試在web application 加上3.0.0.1版本的dll,Specific Version設為False,結果發現其它dll跟它是有關聯的。
好吧,一個一個地加
System.Web.WebPages
System.Web.WebPages.Razor
System.Web.WebPages.Deployment
結果在這裡卡殼了,無論怎麼加,始終報錯
Could not load file or assembly 'System.Web.WebPages.Deployment‘
3.最後的終極方法是在web applicaion裏面重新安裝Microsoft.AspNet.Mvc,當拿到最新版本4.0.0.0時,終於圓滿了,只要比引用的project版本新,就沒有問題.
Open 'Package Manager Console' in Visual Studio
Uninstall-Package Microsoft.AspNet.Mvc
Install-Package Microsoft.AspNet.Mvc
4.還有個問題就是本地能夠build,運行也沒問題,但發佈到server上就出錯,在web.config上更改如下就可以了
Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.0, Elmah.MVC issue
http://stackoverflow.com/questions/16797015/could-not-load-file-or-assembly-system-web-mvc-version-3-0-0-0-elmah-mvc-issu
To fix this i had to add a binding redirect to my Web.config file: (at the end of the file, just before the
</configuration> tag)
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
the schema version of 'microsoft.aspnet.mvc' is incompatible with version of nuget的更多相关文章
- Encountered an unexpected error when attempting to resolve tag helper directive '@addTagHelper' with value '"*, Microsoft.AspNet.Mvc.TagHelpers"'
project.json 配置: { "version": "1.0.0-*", "compilationOptions": { " ...
- VS2015突然报错————Encountered an unexpected error when attempting to resolve tag helper directive '@addTagHelper' with value 'Microsoft.AspNet.Mvc.Razor.TagHelpers.UrlResolutionTagHelper
Encountered an unexpected error when attempting to resolve tag helper directive '@addTagHelper' with ...
- 关于TagHelper的那些事情——Microsoft.AspNet.Mvc.TagHelpers介绍
写在开始 在上一篇文章中,简单介绍了什么是TagHelper,怎么使用它.接下来我会简单介绍一下微软随着ASP.NET5一起发布的TagHelpers.它们分别是: AnchorTagHelper C ...
- 命名空间“Microsoft.AspNet”中不存在类型或命名空间名“Mvc”
问题: 错误 CS0234 命名空间"Microsoft.AspNet"中不存在类型或命名空间名"Mvc"(是否缺少程序集引用?) 解决方案: 打开文件夹 Us ...
- 从Microsoft.AspNet.Identity看微软推荐的一种MVC的分层架构
Microsoft.AspNet.Identity简介 Microsoft.AspNet.Identity是微软在MVC 5.0中新引入的一种membership框架,和之前ASP.NET传统的mem ...
- 所生成项目的处理器架构“MSIL”与引用“Microsoft.AspNet.Scaffolding.12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=x86”的处理器架构“x86”不匹配。
生成成功后: 3>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): ...
- Orchard Core 版本冲突 The type 'FormTagHelper' exists in both 'Microsoft.AspNetCore.Mvc.TagHelpers, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' and...
最近老大让我看Orchard Core,这是一个CMS系统.可以先参考大佬的文章:https://www.cnblogs.com/shanyou/archive/2018/09/25/9700422. ...
- TypeLoadException: Could not load type 'Microsoft.AspNetCore.Mvc.Internal.IHttpResponseStreamWriterFactory' from assembly 'Microsoft.AspNetCore.Mvc.Core, Version=2.1.2.0 ...
今天调试 asp.net core 2.0 项目时遇到了如下错误: TypeLoadException: Could not load type 'Microsoft.AspNetCore.Mvc.I ...
- AspNet MVC与T4,我定制的视图模板
一. 遇到的问题 文章开头部分想先说一下自己的困惑,在用AspNet MVC时,完成Action的编写,然后添加一个视图,这个时候弹出一个添加视图的选项窗口,如下: 很熟悉吧,继续上面说的,我添加一个 ...
随机推荐
- 四、poll()、select()和epoll()
在用户程序中,poll()和select()系统调用用于对设备进行无阻塞访问.poll()和select()最终会调用设备驱动中的poll()函数,在我所使用的Linux内核中,还有扩展的poll() ...
- 『Python基础练习题』day01
个人主页: https://lipeiguan.top 1.简述变量命名规范 2.name = input(">>>") name变量是什么数据类型? 3.if条 ...
- @Adaptive注解
关于@Adaptive注解 引用dubbo官方文档的一段话: Adaptive 可注解在类或方法上.当 Adaptive 注解在类上时,Dubbo 不会为该类生成代理类.注解在方法(接口方法)上时 ...
- spring-cloud搭建
1.myApplicaion 启动服务类上层必须有一层包 2.报错 com.sun.jersey.api.client.ClientHandlerException: java.net.Connect ...
- ASP.NET WEB应用程序(.network4.5)MVC Razor视图引擎2
https://www.bbsmax.com/A/gAJG67OXzZ/ 在MVC3.0版本的时候,微软终于引入了第二种模板引擎:Razor.在这之前,我们一直在使用WebForm时代沿留下来的ASP ...
- C++ DLL debug版本在其他PC上缺少依赖的处理方式
1.正常情况提供给其他人的都是Release版本DLL 2.在需要提供Debug版本时,目标机器上可能会缺少环境,或者和生成DLL的环境不匹配导致DLL无法加载,提示DLL无法找到. 3.使用DLL依 ...
- JS 百度地图 换地图主题颜色(自定义)
JS 百度地图 换地图主题颜色(自定义) 可通过这个在线编辑得到自己想要的主题:https://developer.baidu.com/map/custom/ <div id="all ...
- python-----批量操作xml文件(新建、增、删、改、查)
最近需要处理xml文件,学习并整理了一些常用的操作,代码如下: #!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019/7/9 15: ...
- Python3+Appium学习笔记06-noReset参数
百度很多文章说noReset这个参数是用来防止重复安装app的.可能这是以前的用法.目前最新版本appium默认是清除session信息,并且不会删除应用的. noReset这个参数,根据appi ...
- WCF 使用Stream模式进行文件上传 --节选自Packt.Net.Framework.4.5.Expert.Programming.Cookbook
使用Stream上传文件 文件上传功能是web程序/服务上常用和必须的功能,WCF也不例外.在4.0版本之前,WCF仅仅提供了buffered模式上传文件.从4.0版本之后,WCF开始提供了Strea ...