任何好的 PowerShell MSBuild 任务? [英] Any good PowerShell MSBuild tasks?
问题描述
有人知道任何可以执行 PowerShell 脚本并传递不同参数的好的 MSBuild 任务吗?
Anyone know of any good MSBuild tasks that will execute a PowerShell script and pass it different parameters?
我能够找到 B# .NET 博客:从 MSBuild 调用 PowerShell 脚本,但我希望能更完善一些.
I was able to find B# .NET Blog: Invoking PowerShell scripts from MSBuild, but I'm hoping for something that is a little more polished.
如果我找不到任何东西,我当然会继续使用该博客文章作为入门来完善我自己的内容.
If I can't find anything I will of course just go ahead and polish my own using that blog post as a starter.
推荐答案
可以使用 http://powershellmsbuild.codeplex.com/ 为 3.5.如果有 NuGet 就好了可以通过 NuGet 包还原来利用它的包.
One could use http://powershellmsbuild.codeplex.com/ for 3.5. It'd be nice if there was a NuGet package for it that one could leverage via NuGet package restore.
4.0 有一个 Windows Powershell 任务工厂 你可以在代码库中获得 已被卷入MSBuild 扩展包(顶级任务库之一 - 400 多个任务并在 MSBuild 内部推荐) 有 PowerShellTaskFactory
(从 此示例版本的下载部分 进行查看).
4.0 has a Windows Powershell Task Factory which you can get in the code gallery has been rolled into
MSBuild Extension Pack (one of the top task libraries - 400+ Tasks & recommended in Inside MSBuild) has PowerShellTaskFactory
(download the help file from the download section of this example release to have a peek).
这篇关于任何好的 PowerShell MSBuild 任务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!