【问题标题】:selecting a specific project using $dte in Visual Studio 2012在 Visual Studio 2012 中使用 $dte 选择特定项目
【发布时间】:2013-11-14 14:12:37
【问题描述】:

我正在尝试使用 $dte powershell 命令卸载项目。我从 Visual Studio 中的包管理器控制台运行此命令。我知道我可以使用

卸载项目
$dte.ExecuteCommand("Project.UnloadProject")

但在此之前,我必须选择项目,但我无法这样做。有什么想法吗?

【问题讨论】:

  • 基本上我正在寻找在 Visual Studio 解决方案资源管理器中选择特定项目的命令。

标签: powershell visual-studio-2012 envdte


【解决方案1】:

您应该能够执行以下操作:

$dte.Solution.Projects | Where { $_.Name -imatch "DesiredProjectName" }

但我只引用了MSDN上的文档

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-06-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多