moodmosaic (Nikos Baxevanis)
Blog - About - Open Source - Bookmarks - Tags

Empty ASP.NET Web API Project Template

Friday, 02 November 2012

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.

━━━

This post has been filed under #asp.net

Feedback

Have feedback on this page? Let @nikosbaxevanis know on twitter. Need help or found a bug? Contact me.


© 2011-2018 Nikos Baxevanis. All written content on this site is provided under a Creative Commons ShareAlike license. All code is provided under a MIT license unless otherwise stated.