ASP.NET MVC Versions–Microsoft.AspNet.Mvc

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..<package id="Microsoft.AspNet.Mvc" version="4.0.30506.0" targetFramework="net40" />  (this package includes the System.Web.Mvc.dll Runtime Version v4.0.30319, Version and specifically Product version 4.0.20710.0 shown via file properties)

Inside the out of box .NET 4, MVC application we have…

image  image 

Looking at the System.Web.Mvc.dll that was deliver 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 <package id="Microsoft.AspNet.Mvc" version="4.0.30506.0" targetFramework="net40" />


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 <package id="Microsoft.AspNet.Mvc" version="4.0.40804.0" targetFramework="net40" />  Looking at the project references after the update we can see System.Web.Mvc Runtime version 4.0.30319 and Version  Note: the file in the bin directory is not updated until after a project build.  Now looking at the file properties we can see File version 4.0.40804.0 and Product version 4.040804.0
image  image

In summary…


Nuget Package: <package id="Microsoft.AspNet.Mvc" version="4.0.30506.0" targetFramework="net40" />
Project Reference: System.Web.Mvc.dll Runtime Version v4.0.30319, Version
File System: Product version 4.0.20710.0


Nuget Package: <package id="Microsoft.AspNet.Mvc" version="4.0.40804.0" targetFramework="net40" />
Project Reference:System.Web.Mvc Runtime version 4.0.30319 and Version
File System:File version 4.0.40804.0

We also have to note that the web.config was updated by the Nuget package, notice below the newVersion is
  <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
  <bindingRedirect oldVersion="" newVersion="" />



comments powered by Disqus


Recent Tweets

Maybe resolved itself, after resetting emulator and couple restarts - will let you know
@MillerMark A few weeks ago you tweeted that something huge/incredible was coming....what is/was it? (I am hoping s……
Oddly, it won't hit breakpoints in XF .net standard 2 project now either
@JamesMontemagno Updated to 15.7 preview 2 Visual Studio - now having lots of odd thread issues when starting debug……