Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pure asp.net Web API application

I created a new project based on the Web API template, but found that it include a lot of unnecessary files that I don't need such as the regular mvc routes, css, js, cshtml files. I wanted a pure asp.net Web API application, What can I delete from this project template?

like image 691
clifford.duke Avatar asked Sep 25 '26 06:09

clifford.duke


1 Answers

This is pretty annoying - there is no "empty" template for WebAPI by default so you have to delete the following:

  • /Areas/
  • /Content/
  • /Images/
  • /Scripts/
  • /Views/
  • favicon.ico

This should leave you with the default generated Controllers and App_Start folders which, along with the Global.asax & Web.Config is the only thing you really need for a plain WebAPI project.

I haven't tried this, but it claims to provide a real empty WebAPI template: http://visualstudiogallery.msdn.microsoft.com/a989a149-4bc3-4292-ac8a-5101ee1722d7

like image 100
CodingIntrigue Avatar answered Sep 27 '26 19:09

CodingIntrigue



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!