热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

我正在使用哪个版本的MVC?-WhichversionofMVCamIusing?

Icantfinditforsomereason,feelingalittledumb.HowdoIknow?Imusing.net4withVS2010.

I can't find it for some reason, feeling a little dumb. How do I know? I'm using .net 4 with VS2010.

因为某种原因,我找不到它,觉得有点傻。我怎么知道?我在VS2010中使用。net 4。

7 个解决方案

#1


350  

Open web.config file and find the System.Web.Mvc assembly definition:

开放网络。配置文件并找到System.Web。Mvc组件定义:

assembly="System.Web.Mvc, Version=3.0.0.0 ..."

It's an MVC3 as you see. Via web you can use MvcDiagnostics which is similar to phpinfo() functionality in PHP.

这是一个MVC3。通过web,您可以使用与PHP中的phpinfo()功能类似的MvcDiagnostics技术。

#2


241  

Select the System.Web.Mvc assembly in the "References" folder in the solution explorer. Bring up the properties window (F4) and check the Version

选择包含。解决方案资源管理器中的“引用”文件夹中的Mvc程序集。打开properties窗口(F4)并检查版本

Reference Properties

#3


14  

Another solution is to search for mvc in nuget (right click on your MVC project in visual studio and select "Manage Nuget Packages").

另一个解决方案是在nuget中搜索mvc(右键单击visual studio中的mvc项目,选择“Manage nuget包”)。

This will show you the version currently installed -enter image description here

这将显示当前安装的版本。

And it'll also allow you to update the MVC version - enter image description here

它还允许你更新MVC版本-

#4


11  

typeof (Controller).Assembly.GetName().Version

Gives the current version programatically

以编程方式给出当前版本

#5


4  

I had this question because there is no MVC5 template in VS 2013. We had to select ASP.NET web application and then choose MVC from the next window.

我有这个问题是因为在VS 2013中没有MVC5模板。我们必须选择ASP。然后从下一个窗口中选择MVC。

You can check in the System.Web.Mvc dll's properties like in the below image.

你可以登录System.Web。Mvc dll的属性,如下图所示。

enter image description here

#6


2  

Well just use MvcDiagnostics.aspx It shows lots information about current MVC instalations, and also helps with debuging. You can find it in MVC source or just Google for it.

只使用MvcDiagnostics。它显示了关于当前MVC安装的大量信息,并且有助于调试。你可以在MVC源代码或者谷歌中找到它。

#7


1  

I chose System.web.MVC from reference folder and right clicked on it to go property window where I could see version of MVC. This solution works for me. Thanks

我选择了包含。MVC from reference文件夹,右键点击到属性窗口,我可以看到MVC的版本。这个办法对我有效。谢谢


推荐阅读
author-avatar
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有