How to determine the current version of ASP.NET MVC?

前端 未结 7 1987
北荒
北荒 2021-01-30 09:56

Is there a way to get the current version of ASP.NET MVC in code? Reflecting on MVC assemblies is needed? Any new IIS server variables? Some property to read in HTTP context?

7条回答
  •  天涯浪人
    2021-01-30 10:23

    On the off chance you do not have access to the code and/or want to determine the version of ASP.NET that has been deployed on a machine, you can do the following (from TechNet):

    How do I determine which version of ASP.NET MVC is installed on my system?

    For MVC 4.0, MVC 5.0, or MVC 5.1 you should have deployed the affected binary (System.Web.MVC.dll) with your application. Check your application’s bin folder for the version of the binary. For MVC 2.0, MVC 3.0, or MVC 4.0, refer to the Add or Remove Programs control panel item for the version of MVC installed.

提交回复
热议问题