How do I delete NuGet packages that are not referenced by any project in my solution?

前端 未结 11 1250
攒了一身酷
攒了一身酷 2021-01-30 01:53

Somehow during the upgrade to VS2012 and .NET 4.5, I\'ve managed to get NuGet confused. There are packages that appear in the package manager (and the packages folder) that I c

11条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-30 02:29

    If you have removed package using Uninstall-Package utility and deleted the desired package from package directory under solution (and you are still getting error), just open up the *.csproj file in code editor and remove the tag manually. Like for instance, I wanted to get rid of Nuget package Xamarin.Forms.Alias and I removed these lines from *.csproj file.

    And finally, don't forget to reload your project once prompted in Visual Studio (after changing project file). I tried it on Visual Studio 2015, but it should work on Visual Studio 2010 and onward too.

    Hope this helps.

提交回复
热议问题