Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing References from Asp.Net Web Api Project

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

like image 778
Felipe Oriani Avatar asked Jul 16 '13 12:07

Felipe Oriani


1 Answers

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.

like image 106
Pablo Cibraro Avatar answered Sep 28 '22 15:09

Pablo Cibraro