简体   繁体   English

如何在Package Manager控制台中选择除两个或三个项目以外的所有项目

[英]How to select all project except two or three project in Package Manager Console

I have a fairly large solution which has about 150 projects. 我有一个相当大的解决方案,大约有150个项目。 I want to reinstall all packages via Package Manager Console. 我想通过软件包管理器控制台重新安装所有软件包。

I can select any types of packages using Get-Project and with wild char name. 我可以使用Get-Project并使用通配符名称选择任何类型的软件包。 For example for selecting all test projects I use 例如,选择我使用的所有测试项目

Get-Project CompanyName.ProjectName.*.Tests

But currently, I am interested to select all projects except some of them. 但是目前,我有兴趣选择除其中一些项目以外的所有项目。 Say I want to skip three projects called CompanyName.ProjectA , CompanyName.ProjectB and CompanyName.ProjectC . 说我要跳过三个项目,分别为CompanyName.ProjectACompanyName.ProjectBCompanyName.ProjectC How can I select all projects except those three? 我如何选择除这三个项目以外的所有项目?

I am using Visual Studio 2017 我正在使用Visual Studio 2017

How to select all project except two or three project in Package Manager Console 如何在Package Manager控制台中选择除两个或三个项目以外的所有项目

As we know, The Package Manager Console provides a PowerShell interface within Visual Studio on Windows to interact with NuGet through the specific commands listed. 众所周知,程序包管理器控制台在Windows的Visual Studio中提供了PowerShell界面,可通过列出的特定命令与NuGet进行交互。 So we could also use the PowerShell command line on the Package Manager Console. 因此,我们还可以在程序包管理器控制台上使用PowerShell命令行。 You can use following command line with option -inotmatch all projects except those three: 您可以将以下命令行与-inotmatch选项-inotmatch使用,除了这三个项目以外的所有项目:

(Get-ChildItem -Path $path -Recurse -Filter "*.csproj").name -inotmatch 'CompanyName.ProjectA|CompanyName.ProjectB|CompanyName.ProjectC'

Check PowerShell reference for some details. 检查PowerShell参考以获取一些详细信息。

Hope this helps. 希望这可以帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 通过Package Manager Console从解决方案中删除项目 - Remove project from solution via Package Manager Console 程序包管理器控制台中默认项目下拉菜单的键盘快捷键? - Keyboard Shortcut for Default project dropdown in Package Manager Console? 与程序包管理器控制台中的实体框架相关的项目启动出错 - Error on Project Startup relating to Entity Framework in Package Manager Console Powershell包含在Visual Studio中的程序包管理器控制台中的项目中 - Powershell Include In Project From Package Manager Console In Visual Studio 如何在VS NuGet Package Manager控制台中永久设置新的Default项目? - How do I permanently set a new Default project in the VS NuGet Package Manager console? 如何确定在Powershell的Visual Studio程序包管理器控制台中选择的默认项目? - How do I determine the default project selected in the Visual Studio Package Manager Console in Powershell? 如何将另一个包管理器添加到ASP.NET MVC 6项目? - How to add another package manager to a ASP.NET MVC 6 project? Net Core:使用命令行更改“包管理器控制台”Nuget 中的“默认项目” - Net Core: Use Command Line to Change 'Default Project' in 'Package Manager Console' Nuget 如何打包和导出您的所有项目? - How to package and export all of your project? 为Package Manager迁移操作指定“项目名称” - Specifying the “project name” for Package Manager migration operations
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM