Published 2nd of November, 2012, by Nikos Baxevanis. Tagged as asp.net.

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.



Wish to comment?

You can comment on this post on GitHub. Alternatively, you can discuss this post on Twitter or elsewhere with a permalink. Ping me with the link, and I may respond.