Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.

Join them; it only takes a minute:

Sign up
Join the Stack Overflow community to:
  1. Ask programming questions
  2. Answer and help your peers
  3. Get recognized for your expertise

I'm creating a new asp.net web api project, and it will works just as an Rest API, there is no interfaces and web standards, just a rest service to serv from other front-end applications. When I create my solution in Visual Studio, it add in my project all references of a asp.net mvc project with lots of files and references in packages folder that I will not use. I would like to know what references can I remove from my project to get it working just as a API (and remove from the packages folder)?

enter image description here

share|improve this question
up vote 4 down vote accepted

It's easier if you go to the installed nuget packages in the project, and remove all the packages that are not related to ASP.NET Web API. You won't be able to remove packages that Web API relies on. Also, the Help feature in Web API relies on ASP.NET MVC, so if you want to remove the dependencies of ASP.NET MVC, you will have to delete the ASP.NET Area generated for that in the project. Once you remove all the nuget packages that you don't need, you will get some compilation errors because of existing references to unexisting classes, so you will have to get rid of those as well.

share|improve this answer
    
Thank you Pablo :)... I think the Microsoft should create a real API Rest based template, without any references to ViewEngines like Razor... – Felipe Oriani Jul 16 '13 at 14:03
1  
It looks like there is a template already, which is not official. nikosbaxevanis.com/2012/11/02/… – Pablo Cibraro Jul 16 '13 at 19:26
    
Very useful link Pable. Thank you. – Felipe Oriani Jul 16 '13 at 19:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.