Which version of MVC am I using?

2019-01-29 19:46发布

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

9条回答
地球回转人心会变
2楼-- · 2019-01-29 19:59

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.

查看更多
做自己的国王
3楼-- · 2019-01-29 20:02

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

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.

查看更多
一夜七次
4楼-- · 2019-01-29 20:03

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

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

查看更多
Anthone
5楼-- · 2019-01-29 20:06

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.

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

enter image description here

查看更多
Anthone
6楼-- · 2019-01-29 20:11

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

查看更多
趁早两清
7楼-- · 2019-01-29 20:13

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

Reference Properties

查看更多
登录 后发表回答