Removing Links from an Asp.Net Web Api Project

I am creating a new asp.net project for web api, and it will work just like the Rest API, there are no interfaces and web standards, but just a service for servicing from other front-end applications. When I create my solution in Visual Studio, it adds to my project all the links of the asp.net mvc project with a large number of files and links in the package folder that I will not use. I would like to know what links can be removed from my project to make it work as an API (and removed from the packages folder)?

enter image description here

+6
source share
1 answer

This is easier if you go to the installed nuget packages in the project and remove all packages that are not related to the ASP.NET web API. You cannot remove the packages that the web interface is based on. In addition, the help function in the Web API is based on ASP.NET MVC, so if you want to remove ASP.NET MVC dependencies, you will need to remove the ASP.NET scope generated for this in the project. After removing all the nuget packages that you don’t need, you will get some compilation errors due to existing references to unused classes, so you will also have to get rid of them.

+4
source

Source: https://habr.com/ru/post/949560/


All Articles