We Have following MVC project where the build settings are as follows.
Application Build settings
And there we have the statement in the index page
@Html.Raw("Version: " + System.Environment.Version.ToString()); to show the ASP.NET version running.
when the Application is running through Visual studio it displays
My Question is why is it displaying 4.0 where it should be 4.7.2 looks like the application is using ASP.NET 4.0 to me.
Appreciate if someone could explain why we are getting a different runtime displayed here.
If it's the correct version 4.0 what should we do to make IIS express use 4.7.2
As far as I know, the IIS application pool is use CLR version not use .Netframework version.
The CLR is identified by its own version number. The .NET Framework version number is incremented at each release, but the CLR version is not always incremented.
For example, .NET Framework 4, 4.5, and later releases include CLR 4
More details, you could refer to this article.