Lajos Arpad Lajos Arpad - 1 year ago 90
ASP.NET (C#) Question

Why am I unable to remove nuget packages from a .NET project?

I received the following task

  1. Remove the nuget packages from MyProject (check other webapps):



Since I am not too fluent in .NET-specific technicalities, I have been searching for a while to find these. I have been using Visual Studio 2015 to search for these and found them under packages in the project's file tree. After removing them and removing the following line from web.config:

<add assembly="Microsoft.Web.Samples.ImageSprite" namespace="Microsoft.Web.Samples" tagPrefix="asp" />

I expected to successfully remove these from the project, but after I built the project the files reappeared under packages. What could be the cause of this behavior?

Answer Source

Since they are NuGet packages you should just be able to go to tools->NuGet Package Manager -> Manage NuGet packages for solution.

This will list all the installed packages for the project and you can uninstall them from here.

EDIT: Alternative solution from OP That seems like a solution, but I already found out another one. I needed to remove the corresponding lines from packages.config

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download