Versions of Asp.net
- June 11, 2020
While creating a new web application targeting .NET Framework 4 we see a dialog like the following. Great all good right.
What is Microsoft.AspNet.Mvc? What is System.Web.Mvc.dll? Are these related…in short yes. I had some confusion as to the relationship between System.Web.Mvc and the Nuget package Microsoft.AspNet.Mvc. Here is how….
Yes, they are very much related. Do things have to be this confusing?
So tracking this down, I created a new out-of-the-box Asp.Net MVC Application. Afterwards, I opened up Nuget Manager in order to review what packages were installed. I see a number of packages needing updating. In particular, I see one Microsoft.AspNet.Mvc however I do not see this assembly in my project references. Remember - Nuget packages can and do include one or more assemblies(dll’s) and can be named differently than the package name. In this particular case, the package Microsoft.AspNet.Mvc contains the System.Web.Mvc.dll. For the record, the project when created referenced this package..
Looking at the System.Web.Mvc.dll that was delivered with the new .NET 4 application we have the following dll. In addition, if we look at the existing Nuget packages in the application we have the following package
Now, we will update the Microsoft.AspNet.Mvc version 4.0.30506.0 package to 4.0.40804.0 to see what occurs.
The package in the packages file was updated to
We also have to note that the web.config was updated by the Nuget package, notice below the newVersion is 188.8.131.52