Much of my build process is a collection of PowerShell scripts and functions, all defined within a .ps1
file. I simply have a shortcut to that file on my desktop, and it launches PowerShell and initializes everything.
Now, I think it would be handy if I could just run that shell within the Visual Studio 2013 environment. That way, I wouldn't need to keep switching windows when I want to build, publish things to IIS, perform database provisioning, etc. Should be easy enough, right?
The first thing I found was PowerConsole , an extension for Visual Studio that allows users to access Power Shell from within VS. However, it only works with Visual Studio 2010. According to the author , the NuGet team basically forked his code and it's now part of the NuGet console. So, my next idea was to just use the NuGet console. This has a few problems:
dir
, it doesn't really behave like PowerShell. For example, you can't change the prompt, even if you override the prompt
function. BuildShell.ps1
file, none of the functions within the file are registered and nothing seems to change. Overall, this seems like a hacky way to integrate a custom build environment into Visual Studio. So, next step is to create my own extension. After all, that's all NuGet is, right?
The Question:
How do you create a NuGet like extension for Visual Studio 2013? MSDN has quite a few Visual Studio 2013 Extension samples , however they seem to be geared around extending the editor (such as what reSharper might do) and not creating new command windows. I'm looking for something to get me started, or perhaps an open source program I can look at. Thanks!
您是否考虑过适用于Visual Studio的PowerShell工具 ?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.