Invoke-TaskFromVSCode
1.0
This script invokes the current task from the build script being edited in
Visual Studio Code. It is invoked either in VSCode or PowerShell console.
The script is used with VSCode PowerShell extension:
https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell
Invoke-Build.ps1 is searched in the directory of Invoke-TaskFromVSCode.ps1
and then in the pa
Visual Studio Code. It is invoked either in VSCode or PowerShell console.
The script is used with VSCode PowerShell extension:
https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell
Invoke-Build.ps1 is searched in the directory of Invoke-TaskFromVSCode.ps1
and then in the pa
This script invokes the current task from the build script being edited in
Visual Studio Code. It is invoked either in VSCode or PowerShell console.
The script is used with VSCode PowerShell extension:
https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell
Invoke-Build.ps1 is searched in the directory of Invoke-TaskFromVSCode.ps1
and then in the path.
The current task is the task at the caret line or above. If none is found
then the default task is invoked. Currently the script should be saved
manually before invoking.
In order to register editor commands create or open VSCode profile:
C:\Users\...\Documents\WindowsPowerShell\Microsoft.VSCode_profile.ps1
and add two commands:
Register-EditorCommand -Name IBVSCode -DisplayName 'Invoke task in VSCode' -ScriptBlock {
param($Context)
Invoke-TaskFromVSCode.ps1
}
Register-EditorCommand -Name IBConsole -DisplayName 'Invoke task in console' -SuppressOutput -ScriptBlock {
param($Context)
Invoke-TaskFromVSCode.ps1 -Console
}
These commands assume that Invoke-TaskFromVSCode.ps1 is in the path.
If this is not the case then specify the full script path there.
In order to show and invoke commands in VSCode, press Ctrl+Shift+P to open
the command palette. Type the characters addi until you see the item
"PowerShell: Show additional commands" and then press Enter.
Show more
Visual Studio Code. It is invoked either in VSCode or PowerShell console.
The script is used with VSCode PowerShell extension:
https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell
Invoke-Build.ps1 is searched in the directory of Invoke-TaskFromVSCode.ps1
and then in the path.
The current task is the task at the caret line or above. If none is found
then the default task is invoked. Currently the script should be saved
manually before invoking.
In order to register editor commands create or open VSCode profile:
C:\Users\...\Documents\WindowsPowerShell\Microsoft.VSCode_profile.ps1
and add two commands:
Register-EditorCommand -Name IBVSCode -DisplayName 'Invoke task in VSCode' -ScriptBlock {
param($Context)
Invoke-TaskFromVSCode.ps1
}
Register-EditorCommand -Name IBConsole -DisplayName 'Invoke task in console' -SuppressOutput -ScriptBlock {
param($Context)
Invoke-TaskFromVSCode.ps1 -Console
}
These commands assume that Invoke-TaskFromVSCode.ps1 is in the path.
If this is not the case then specify the full script path there.
In order to show and invoke commands in VSCode, press Ctrl+Shift+P to open
the command palette. Type the characters addi until you see the item
"PowerShell: Show additional commands" and then press Enter.
Installation Options
Owners
Copyright
(c) 2011-2016 Roman Kuzmin
Package Details
Author(s)
- Roman Kuzmin
Tags
Invoke Task Invoke-Build VSCode
Dependencies
This script has no dependencies.
FileList
- Invoke-TaskFromVSCode.nuspec
- Invoke-TaskFromVSCode.ps1