Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit

Bump test project dependencies
- Castle.Core, Moq, and xUnit versions were all out of date
- hold xunit.runner.visualstudio version back in .NET SDK test projects
  - can be moved to latest version after we stop testing on netcoreapp2.1
- add missing xunit.analyzers reference to System.Web.Razor.Test project
- move all test projects to .NET v4.6.2 (a supported framework)
  - remove `netstandard` reference in System.Net.Http.Formatting.Test; not needed w/ new TFM & updated references
- further separate build of Microsoft.TestCommon project when invoked from NetCore.Test project
  - special case `RestorePackages` for this case
  - add System.Net.Http references to avoid conflicting versions e.g. src/ and test/ TFMs differ

React to changed xUnit APIs
- adjust Microsoft.TestCommon code
- nit: use `Array.Empty<byte>()` in `TranscodingStreamTests`
  - `TranscodingStream` `internal`s can be `private` instead

Resolve xUnit issues new analyzers find
- address xUnit2000 warnings
  - pass expected values to `Assert.Equal(...)` as correct (left) argument
- make generic method types explicit to avoid
  `error CS0121: The call is ambiguous between the following methods or properties: ...`
- note: cannot remove unnecessary xUnit1013 suppression
  - related bug (xunit/xunit#1466) apparently not fixed in 1.0.0 analyzers package
  - was xunit/xunit.analyzers#82 fix (in 2017) insufficient?

React to new Moq changes
- avoid `ProtectedMock\`1.ThrowIfPublicMethod(...)` `throw`ing
  - use new overloads introduced in the Moq 4.11.0 release
- adjust to Moq hiding the `ObjectProxy` type better
- update `ControllerContext` mocking to avoid NREs
  - setting `HttpContext.User` on the `Object` left `get` value `null` (did nothing)
- nit: use `SetupGet(...)` for another property

Git stats


Failed to load latest commit information.
Latest commit message
Commit time
November 21, 2022 11:08

ASP.NET MVC, Web API, Web Pages, and Razor

Note: This repo is for ASP.NET MVC 5.x, Web API 2.x, and Web Pages 3.x. For ASP.NET Core MVC, check the AspNetCore repo.

ASP.NET MVC is a web framework that gives you a powerful, patterns-based way to build dynamic websites and Web APIs. ASP.NET MVC enables a clean separation of concerns and gives you full control over markup.

This repo includes:

  • ASP.NET MVC 5.x
  • ASP.NET Web API 2.x
  • ASP.NET Web Pages 3.x
  • ASP.NET Razor 3.x


Check out the contributing page to see the best places to log issues and start discussions.

Tags and releases

Git tag or branch Other products MVC package versions Web API package (product) versions Web Pages package versions
v2.0.4 4.0.40804 4.0.30506 2.0.30506
v2.1 ASP.NET and Web Tools 2012.2, VS 2012 Update 2 (not on v4 2012.2 Update RTM v1 2012.2 Update RTM v2 2012.2 Update RTM
v3.0.2 5.0.2 5.0.1 (2.0.1) 3.0.1
v3.1.3 5.1.3 5.1.2 (2.1.2) 3.1.2
v3.2.6 5.2.6 5.2.6 3.2.6
v3.2.7 5.2.7 5.2.7 3.2.7
v3.2.8 5.2.8 5.2.8 3.2.8
main New work e.g. MVC 5.2.9-preview1