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条回答
We Are One
2楼-- · 2019-01-29 20:18
typeof(Controller).Assembly.GetName().Version

Gives the current version programmatically.

查看更多
Fickle 薄情
3楼-- · 2019-01-29 20:18

In Solution Explorer open packages.config and find Microsoft.AspNet.MVC:

package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net461"

From the above we can see it's an Asp.Net MVC 5.2.3 Version.

Moreover packages.config file also helps us to track all the installed packages with their respective versions.

查看更多
爷、活的狠高调
4楼-- · 2019-01-29 20:23

Navigate to "C:\Program Files (x86)\Microsoft ASP.NET" folder. You will see "ASP.NET MVC 4" or something like that. To know detail navigate to "C:\Program Files (x86)\Microsoft ASP.NET{your MVC version}\Assemblies\System.Web.Mvc.dll" Right click and see the version.

查看更多
登录 后发表回答