简体   繁体   English

System.web.mvc和System.web.routing ..是否必须与版本保持同步? 即4.0 = 4.0

[英]System.web.mvc and System.web.routing.. Do they have to be kept with versions in synch? ie 4.0=4.0

One of the guys here at work was saying that System.Web.MVC.dll version number (3.0, 40, etc) has to match the version of System.Web.Routing.dll... 这里工作的人之一是说System.Web.MVC.dll版本号(3.0、40等)必须与System.Web.Routing.dll的版本匹配...

I wanted to understand his statement, so I dug into it and can't find anything on the web by googling. 我想了解他的陈述,因此我将其研读,无法通过谷歌搜索在网上找到任何内容。

I looked on my hard drive and if they need to be in synch I'd expect them to be in the same package. 我查看了硬盘驱动器,如果需要同步,我希望它们放在同一包装中。 They are not. 他们不是。 Routing is in the framework and MVC is in it's own custom location from it's installer. 路由在框架中,而MVC在安装程序的自定义位置中。

So the question is, do they have to be in synch? 所以问题是,他们必须保持同步吗? Our references specify MVC version 3.0.0.0 but routing is not specified, it's the one that matches the version of .NET we are using (in this case 4.5) 我们的参考指定了MVC版本3.0.0.0,但未指定路由,它是与我们使用的.NET版本匹配的版本(在本例中为4.5)

Is that Kosher? 那是犹太洁食? If not can you please explain why? 如果不能,请解释原因?

System.web.routing is actually an empty assembly. System.web.routing实际上是一个空程序集。 All of the actual functions are in System.Web.MVC 所有实际功能都在System.Web.MVC中

This was probably done so that Webforms apps would not need to include a reference to system.web.mvc. 这样做可能是为了使Webforms应用程序不需要包含对system.web.mvc的引用。

If you notice, System.Web.Routing is only 22k, at least in .net 4.5.1. 如果您注意到,至少在.net 4.5.1中,System.Web.Routing只有22k。

Assemblies have version dependencies.. so they often won't work with other assemblies of different versions, you have to check on an assembly by assembly basis... 程序集具有版本依赖性..因此它们通常无法与其他不同版本的程序集一起使用,您必须逐个程序集地检查...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM