PowerShell Tools for Visual Studio 2013

Free

PowerShell integration for Visual Studio

(52) Review
Visual Studio
2013, 14
Download (130,622)
11/27/2014
1.0.5
View
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Description
Reviews (52)
Q and A (105)
Sign in to write a review
Sort by:

by albertcp | March 03 2015

by Yatajga | February 20 2015

by Kaushik N. Patel | February 17 2015

Nice PowerShell extension. It will be great if can also add support for PowerShell DSC.

Adam R Driscoll February 18 2015
| Edit |
Delete

We are working on x64 and DSC support right now. You can find our pre-release builds here: https://ci.appveyor.com/project/PoshTools-MSFT/poshtools/branch/dev

by twolfmain | February 04 2015

by Leopold Lerch | December 17 2014

Only minus is the lack of Support of x64 modules (like the SharePoint-dlls). In any other aspect it deserves 5 stars

by wikky2007 | December 05 2014

by Steve Rathbone | October 04 2014

by Michael J. Prentice | October 03 2014

Love it, thank you!

by Christian Thoenes | September 25 2014

This is awesome! Thanks a lot!

by Chandra Sekar Narayanan | September 25 2014

by Eugene Polonsky | September 12 2014

Very good tool. Good work, Adam!

by Jonathan Allen | September 04 2014

The only thing more I would like would be the ability to run scripts without having to first create a powershell project.

by Plinio B. Figueiredo | September 02 2014

by Ed (DareDevil57) | August 14 2014

by Ransher Singh | August 13 2014

Excellent addon for developers/system administrators alike.

by Thomas Freudenberg | August 09 2014

by Gemini Kris | June 27 2014

Amazing, simply works!

by Matthew Reynolds [MSFT] | June 26 2014

Thank you thank you thank you. Lately I find myself working on mixed C# / Powershell script projects, and being able to do everything directly in VS is awesome.

by Anthony Caragol | June 18 2014

Very nice, love to have this as an option!

by Ryan Mann (TLC) | May 09 2014

This tool works great, but you are running the powershell runspace in the AppDomain.

This causes issues for me because I am developing a powershell module and testing it in the IDE with a script.

So I right click the script and click execute, and it works great. But then I can build my powershell module because Visual Studio has the dll open still because the dll wasn't unloaded at the end of the script.

I suggest that you Create a separate app domain for the script to run in and when it's done (error and all) unload it.

Edit:

Why don't you just have the executor run in a console app and use ProcessStartInfo to run it hidden and get it's output to write to the VS output window? You could compile the console app for x64 and x32 and make the right click execute script have two options "Execute 32" or "Execute 64"

Adam R Driscoll June 03 2014
| Edit |
Delete

This is actually a problem for me as well. :) The problem is with debugging. I need to have access to the variables, breakpoints and debugger state. My hope is to take advantage of the new remote debugging to work around this issue. It's certainly on my radar.

1 - 20 of 52 Items   
Sign in to start a discussion


  • Error loading the tool
    8 Posts | Last post Thu 11:14 AM
    • I have just installed it to my VS2013, I closed VS and launched it again. But I got
      
      Failed to initialize PowerShell Tools for Visual Studio.System.IO.FileNotFoundException: Could not load file or assembly 'System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
      
      File name: 'System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
      
         at PowerShellTools.PowerShellToolsPackage.InitializeInternal()
      
         at PowerShellTools.PowerShellToolsPackage.Initialize()
      
      
      
      WRN: Assembly binding logging is turned OFF.
      
      To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
      
      Note: There is some performance penalty associated with assembly bind failure logging.
      
      To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
    • After I installed Windows Management Framework 4.0 and launch my VS2013 again, I got another error message.
      
      Failed to initialize PowerShell Tools for Visual Studio.System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ComponentModel.Composition.ImportCardinalityMismatchException: No exports were found that match the constraint: 
      	ContractName	PowerShellTools.VisualStudioEvents
      	RequiredTypeIdentity	PowerShellTools.VisualStudioEvents
      
         at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition)
      
         at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportsCore(Type type, Type metadataViewType, String contractName, ImportCardinality cardinality)
      
         at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportedValueCore[T](String contractName, ImportCardinality cardinality)
      
         at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportedValue[T](String contractName)
      
         at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportedValue[T]()
      
         at Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetService[T]()
      
         at PowerShellTools.Diagnostics.DiagnosticsDialogPage..ctor()
      
         --- End of inner exception stack trace ---
      
         at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
      
         at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
      
         at Microsoft.VisualStudio.Shell.Package.GetDialogPage(Type dialogPageType)
      
         at PowerShellTools.PowerShellToolsPackage.InitializeInternal()
      
         at PowerShellTools.PowerShellToolsPackage.Initialize()
    • I am getting the same error, loaded find the first time but subsequent startups produce the error.
    • Not sure if this will work for you but I had a similar error and resolved it by installing the PowerShell ISE Add-On for VS2013 Extension.
    • Can you guys try the latest dev version to see if this resolves your issue? 
      
      https://ci.appveyor.com/project/PoshTools-MSFT/poshtools/branch/dev/artifacts
    • @J_Young_80 - Same series of issues (Automation -> ImportCardinalityMismatchException) seems to be solved via Powershell ISE addon.
    • Weird. We need to look into this. The extension is no way related to this one. 
    • I can confirm WernerCD's findings. This was with Windows 7 x64.
  • Profile in Debug Interactive window?
    2 Posts | Last post Tue 4:12 PM
    • Hi, I can't find mention or figure out how to load my PowerShell profile (as in $profile) in to the Debug Interactive window. Is it possible?
    • Hi Daniel, 
      
      PoshTools actually uses it's own profile. Same location, just named: PoshTools_profile.ps1
      
      You could just load your existing profile in that script or move whatever you need in there. 
  • Debug with break point fails?
    2 Posts | Last post Tue 4:03 PM
    • Hi,
      
      When I place a break point on a line and I start with F5, I get the following results:
      
      [ERROR] C:\Users\xxxxx\documents\visual studio 2013\Projects\PowerShell Script Project1\PowerShell Script Project1\Script.ps1 : Could not load type 'System.Management.Automation.DebuggerCommandResults' f
      [ERROR] rom assembly 'System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
      [ERROR] At line:1 char:1
      [ERROR] + . 'C:\Users\xxxxx\documents\visual studio 2013\Projects\PowerShell Script Pr ...
      [ERROR] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      [ERROR]     + CategoryInfo          : NotSpecified: (:) [Script.ps1], TypeLoadException
      [ERROR]     + FullyQualifiedErrorId : System.TypeLoadException,Script.ps1
      [ERROR]  
      
      Any ideas?
      Thanks
    • Do you have PowerShell v3 installed (Windows Management Framework v3)?
  • Using powershell 32 bit
    2 Posts | Last post March 18, 2015
    • I'm using VS2013 community edition and have installed the "dog food" version of the tools, as I am having troubles with debugging and break points. When I debug a script and check the environment
      
      [environment]::Is64BitProcess the result is "true"
      
      How do I set the environment to be 32bit when debugging? 
      (when I used the previous Poshtools it was 32 bit)
    • Hey Mark,
      
      Could you log and issue on GitHub. There currently isn't a way to run 32-bit on a 64-bit machine. It always runs 64-bit. 
  • Visual Studio Community Edition
    4 Posts | Last post March 18, 2015
    • Hello,
      
      I suppose it's not compatible yet with the Community edition? Is that planned?
      
      For now I get this error message when VS starts and this module is installed (I tried to re-install it to make sure, but the same error comes back):
      
      "Failed to initialize PowerShell Tools for Visual
      Studio.System.IO.FileNotFoundException: Could not load file or assembly 'System.Management.Automation, Version=3.0.0.0 [...]"
      
      Unfortunately I can't put the screenshot here, so it's hosted at this URL:
      http://s12.postimg.org/kkwidv1el/Clipboard01.jpg
      
      Visual Studio Community 2013
      Version 12.0.31101.00 Update 4.
    • It works with community. You need to install Windows Management Framework v3. 
    • Hi,
      I use community edition and Windows 7 sp1. And Management Framework 4. But I get this error message: The extension 'Powershell tools for visual studio 2013' requires a version of the .NET Framework that is not installed'..
      
      I have framework 4.5. It says nothing in the logs about what version is missing. You have any idea what Framework version I'm missing?
    • This is an issue we fixed in newer versions. Want to try a dev build? https://ci.appveyor.com/project/PoshTools-MSFT/poshtools/branch/dev/artifacts
  • Install Question
    2 Posts | Last post March 18, 2015
    • I tried to install this today and got this error:
      
      3/17/2015 9:44:02 AM - Searching for applicable products...
      3/17/2015 9:44:02 AM - Found installed product - Microsoft Visual Studio Express 2013 for Windows Desktop
      3/17/2015 9:44:02 AM - Found installed product - Global Location
      3/17/2015 9:44:02 AM - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.
         at VSIXInstaller.App.InitializeInstall()
         at System.Threading.Tasks.Task.InnerInvoke()
         at System.Threading.Tasks.Task.Execute()
      
      Is Microsoft Visual Studio Express 2013 for Windows Desktop not supported?
    • Hi, Express isn't supported but Community edition is. https://www.visualstudio.com/en-us/news/vs2013-community-vs.aspx
  • debugging not working properly on my visual studio 2013
    3 Posts | Last post March 02, 2015
    • I installed PowerShell Tools for Visual Studio 2013 (Powershell version 4). I created a powerShell Script Project and I can only debug the script code if the project was opened at the first time. The farther debugging will never hit the breakpoint. I have to restart vs 2013 to get debugging work only one time. Please help me out, thanks.
    • This is a known issue. Try giving our pre-release build a shot. Should be fixed. 
      
      https://github.com/Microsoft/poshtools/releases/tag/Dogfood-2-27-14
      
    • This fixed my debugging issue. Thank you very much.
  • Few annoyings things :)
    9 Posts | Last post February 25, 2015
    • I think it's awesome and thank you for making it!
      
      I've tried it for the last couple of days but there are few issues on Visual Studio 2013 Community Edition.
      
      I need to scroll down and up again to get things highlighted again.
      
      I don't get the intellisense immediately.
      
      I feel like ISE is much smarter when it comes to intellisense but maybe it's just because it doesn't work correctly for me.
      
      
      
      
    • I'm experiencing the same symptoms as you. It seemed to work around the .80 versions but not since 1.0
    • Can you guys give some of the latest builds a stab? We have been working a lot with some of issues with editing experience. These are still pre-release but might fix some of the issues you are mentioning. 
      
      https://ci.appveyor.com/project/PoshTools-MSFT/poshtools/branch/dev
    • I've been running the dev branch build for a day now. I am no longer seeing the highlighting problem. Intellisense seems pretty responsive, and Intellisense no longer gets stuck on the screen (and becomes unremovable).
      
      However, the dev build changed the syntax highlighting for me. In the new highlighting all variables are colored Red. The same red that an error is usually colored with. I find this to be disconcerting when working. Is there away to change the syntax highlighting back?
    • I think the highlighting was changed to match the ISE. If it's not, please raise an issue on GitHub. You can always change your font colors in Tools->Options->Fonts and Colors->"PowerShell *"
    • Adam, this dev version resolved most of my issues with highlighting and not stopping at break points so I am very grateful.  Are you looking for other feedback/bugs on this build and if so, where? 
    • Hey Scott, Any feedback you have, please provide on GitHub.
      
      https://github.com/adamdriscoll/poshtools/
      
      Thanks!
    • 1.0.5 has the same behaviour as described Eyal Shilony.
    • Thanks Adam !
      
      This dev version seems also to solve issues I had that are mentioned by steven.
  • Why am I getting errors while writing stuff in comment sections of my script ?
    2 Posts | Last post February 13, 2015
    • I was writing "Fix" in a comment of a ps1 file and got this error when I pressed the "x" key.
      
      I'm using VS12 update 4
      
          <record>334</record>
          <time>2015/02/11 03:17:30.780</time>
          <type>Error</type>
          <source>Editor or Editor Extension</source>
          <description>System.Collections.Generic.KeyNotFoundException: key&#x000D;&#x000A;   &#x00E0; Microsoft.VisualStudio.Utilities.PropertyCollection.GetProperty(Object key)&#x000D;&#x000A;   &#x00E0; PowerShellTools.Classification.PowerShellClassifier.AddTokenClassifications(ITextBuffer buffer, SnapshotSpan span, List`1 classifications, Nullable`1 lastClassificationSpan, IClassificationType gapType)&#x000D;&#x000A;   &#x00E0; PowerShellTools.Classification.PowerShellClassifier.VirtualGetClassificationSpans(SnapshotSpan span)&#x000D;&#x000A;   &#x00E0; PowerShellTools.Classification.Classifier.GetClassificationSpans(SnapshotSpan span)&#x000D;&#x000A;   &#x00E0; Microsoft.VisualStudio.Text.Classification.Implementation.ClassifierTagger.&lt;GetTags&gt;d__0.MoveNext()&#x000D;&#x000A;   &#x00E0; Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.&lt;GetTagsForBuffer&gt;d__5.MoveNext()</description>
        </entry>
    • Interesting. I can't say I've run into this exact issue but I would recommend taking a look at some of the test builds we have been producing to see if it's fixed. 
      
      https://ci.appveyor.com/project/PoshTools-MSFT/poshtools/branch/dev
  • Drop downs do not close
    2 Posts | Last post February 13, 2015
    • Maybe this has already been address but certain drop-downs do not close. For instance, I can do a Get-ChildItem c:\users and I cannot get the drop-down to close. Any ideas? Great extension aside from this issue. Thanks!
    • We have an open item for this. The next version will fix a lot of issues with IntelliSense. 
1 - 10 of 105 Items