I installed twitter bootstrap from NuGet, then I figured out I didn't need it anymore. Just for the sake of file size I want to delete this package files from my project folders.
我从NuGet安装了twitter bootstrap,然后我发现我不再需要它了。仅仅为了文件大小,我想从我的项目文件夹中删除这个包文件。
How can I achieve this without deleting important files?
如何在不删除重要文件的情况下实现此目的?
3 个解决方案
#1
8
Use Uninstall-Package command:
使用Uninstall-Package命令:
PM> Uninstall-Package Bootstrap [-ProjectName [Uninstall from this project]]
PM> Uninstall-Package Bootstrap [-ProjectName [从此项目卸载]]
If ProjectName
parameter is omitted, the default project is chosen. Use the -Force
flag to uninstall the package, even if there are dependencies on it.
如果省略ProjectName参数,则选择默认项目。使用-Force标志卸载软件包,即使它依赖于它。
Hope this helps.
希望这可以帮助。
#2
1
Try the below
试试下面的内容
Uninstall-Package PackageName
来自Nuget Page
The following package elements are removed:
删除以下包元素:
-
References in the project. In Solution Explorer, you no longer see the library in the References folder or the bin folder. (You might have to build the project to see it removed from the bin folder.)
项目中的参考资料。在解决方案资源管理器中,您不再在References文件夹或bin文件夹中看到库。 (您可能必须构建项目以将其从bin文件夹中删除。)
-
Files in the solution folder. The folder for the package you removed is deleted from the packages folder. If it is the only package you had installed, the packages folder is also deleted.)
解决方案文件夹中的文件。您删除的包的文件夹将从packages文件夹中删除。如果它是您安装的唯一软件包,则还会删除packages文件夹。)
-
Any changes that were made to your app.config or web.config file are undone.
对app.config或web.config文件所做的任何更改都将撤消。
#3
1
Another alternative to the command-line via the visual studio interface you can do the following:
通过visual studio界面命令行的另一种替代方法,您可以执行以下操作:
- Right-click the references folder
- Select 'manage nuget packages'
- Select 'installed packages'
- Select the package you want to uninstall
- Press the 'Uninstall button'.
右键单击references文件夹
选择'manage nuget packages'
选择'已安装的包'
选择要卸载的包
按“卸载按钮”。
#1
8
Use Uninstall-Package command:
使用Uninstall-Package命令:
PM> Uninstall-Package Bootstrap [-ProjectName [Uninstall from this project]]
PM> Uninstall-Package Bootstrap [-ProjectName [从此项目卸载]]
If ProjectName
parameter is omitted, the default project is chosen. Use the -Force
flag to uninstall the package, even if there are dependencies on it.
如果省略ProjectName参数,则选择默认项目。使用-Force标志卸载软件包,即使它依赖于它。
Hope this helps.
希望这可以帮助。
#2
1
Try the below
试试下面的内容
Uninstall-Package PackageName
来自Nuget Page
The following package elements are removed:
删除以下包元素:
-
References in the project. In Solution Explorer, you no longer see the library in the References folder or the bin folder. (You might have to build the project to see it removed from the bin folder.)
项目中的参考资料。在解决方案资源管理器中,您不再在References文件夹或bin文件夹中看到库。 (您可能必须构建项目以将其从bin文件夹中删除。)
-
Files in the solution folder. The folder for the package you removed is deleted from the packages folder. If it is the only package you had installed, the packages folder is also deleted.)
解决方案文件夹中的文件。您删除的包的文件夹将从packages文件夹中删除。如果它是您安装的唯一软件包,则还会删除packages文件夹。)
-
Any changes that were made to your app.config or web.config file are undone.
对app.config或web.config文件所做的任何更改都将撤消。
#3
1
Another alternative to the command-line via the visual studio interface you can do the following:
通过visual studio界面命令行的另一种替代方法,您可以执行以下操作:
- Right-click the references folder
- Select 'manage nuget packages'
- Select 'installed packages'
- Select the package you want to uninstall
- Press the 'Uninstall button'.
右键单击references文件夹
选择'manage nuget packages'
选择'已安装的包'
选择要卸载的包
按“卸载按钮”。