logo

Empty ASP.NET Web API Project Template

Usually, every time you create a new Web API project you:

  1. Delete almost all the generated code.
  2. Uninstall NuGet packages that you don’t need (yet, or at all).
  3. Remove unused assembly references.
  4. Manually edit the Web.config file(s) to remove the elements that point to the assemblies which have been removed.

Solution

Use the Empty ASP.NET Web API Project Template. The Visual Studio extension can be downloaded from here.

It will add a new project template Empty Web API which includes the following:

Files

Assemblies

NuGet packages

Remarks

A favicon.ico file is included because the browser requests it so it’s better not to respond with a 404 Not Found.

Update (2013/10/06):

You may install Newtonsoft.Json through NuGet:

PM> Install-Package Newtonsoft.Json

Depending on the configuration, the Newtonsoft.Json package is included because it is can be lazy loaded inside the System.Net.Http.Formatting.JsonMediaTypeFormatter type.