Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpoehls/be3ff16a492ebbc10ec9 to your computer and use it in GitHub Desktop.
Save jpoehls/be3ff16a492ebbc10ec9 to your computer and use it in GitHub Desktop.
new-item : The node at path 'commandbars\menu bar\help\about my module' does not support the cmdlet 'New-Item'
At C:\Users\jpoehls\documents\visual studio 2012\Projects\StudioShellSolModTest\packages\InterWorks.VSExtras.1.0\tools\Init.ps1:10 char:5
+ new-item 'dte:/commandbars/menu bar/help' `
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotImplemented: (commandbars\men...about my module:String) [New-Item], NodeDoesNotSupportCmdletException
+ FullyQualifiedErrorId : NewItem.NotSupported,Microsoft.PowerShell.Commands.NewItemCommand
The property 'ModuleOnRemove' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\jpoehls\documents\visual studio 2012\Projects\StudioShellSolModTest\packages\InterWorks.VSExtras.1.0\tools\Init.ps1:17 char:1
+ $MyInvocation.MyCommand.ScriptBlock.ModuleOnRemove = {
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyAssignmentException
param($installPath, $toolsPath, $package, $project)
$sln = get-item dte:/solution;
$slnName = ( $sln.FullName | split-path -leaf ) -replace '\..+$','';
$menuItems = @(
# list any menu items your module adds here
# e.g.:
new-item 'dte:/commandbars/menu bar/help' `
-name 'about my module' `
-value { 'Module ${slnName}' | `
out-outputpane; invoke-item dte:/windows/output; }
# this function is called automatically when your solution is unloaded
$MyInvocation.MyCommand.ScriptBlock.ModuleOnRemove = {
# remove any added menu items;
$menuItems | remove-item;
<?xml version="1.0"?>
<package xmlns="">
<owners>Joshua Poehls</owners>
<authors>Joshua Poehls</authors>
<tags>VisualStudio StudioShell</tags>
<dependency id="StudioShell.Provider" version="1.6.2" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment