Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 92 additions & 0 deletions blog/2026-03-10-psake-vscode-extension-v1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
title: "psake Meets VS Code: The Official Extension Hits v1.0"
description: "The psake VS Code extension v1.0 brings task discovery, CodeLens integration, a dedicated task explorer, and smart build script detection directly into your editor."
date: 2026-03-10T18:00:00.000Z
slug: psake-vscode-extension-v1
authors:
- heyitsgilbert
tags:
- announcement
- release
- psake
- powershell
- vscode
keywords:
- psake
- VS Code
- Visual Studio Code
- extension
- task runner
- build automation
- PowerShell
- CodeLens
- developer tools
image: /img/social-card.png
draft: false
fmContentType: blog
title_meta: "psake VS Code Extension v1.0"
---

We're thrilled to announce the v1.0 release of the [psake VS Code extension](https://github.com/psake/psake-vscode)—bringing first-class psake support directly into the world's most popular code editor. If you've been running psake from the terminal, you can now discover, navigate, and execute your build tasks without ever leaving VS Code.

<!-- truncate -->

## Why a VS Code Extension?

A core part of our mission with psake is meeting developers where they already work. Whether that's through [AI-assisted workflows with Agent Skills](/blog/introducing-psake-agent-skill), CI/CD pipelines, or your daily editor—we want psake to feel native to your environment. With VS Code being the editor of choice for so many PowerShell developers, a dedicated extension was a natural next step.

## What's in v1.0

This isn't a minimal snippet pack. The v1.0 release is a full-featured integration that makes VS Code aware of your psake build system.

### Task Provider

The extension automatically detects tasks from your `psakefile.ps1` and surfaces them in VS Code's built-in task system. Your default task maps to the Build group, so `Ctrl+Shift+B` just works. Tasks refresh automatically when you save your build file—no manual reload needed.

### psake Tasks Explorer

A dedicated sidebar panel in the Explorer view gives you an at-a-glance view of every task in your project, complete with descriptions and dependency chains. Click any task to navigate directly to its definition, or hit the run button to execute it immediately.

### CodeLens Integration

Every `Task` declaration in your build file gets a "Run Task" CodeLens action. See a task, run it—right from the editor gutter. It's the fastest path from reading build logic to executing it.

### Smart Build Script Detection

If your project uses a wrapper script like `build.ps1` (a common pattern in the psake ecosystem), the extension detects it automatically and routes task execution through it. This means your bootstrapping, dependency installation, and any custom setup all run correctly—just as they would from the terminal.

### tasks.json IntelliSense

When you configure psake tasks in `.vscode/tasks.json`, the extension provides autocomplete for task names. Combined with the new "psake: Sync Tasks to tasks.json" command, you can quickly wire up your build tasks into VS Code's task runner with full IntelliSense support.

### Nine Code Snippets

Scaffolding new tasks and build file structures is faster with nine built-in snippets covering everything from basic task definitions to `Properties`, `Include`, `Framework`, `FormatTaskName`, `TaskSetup`, and `TaskTearDown` blocks.

## Quick Start

1. Install the [psake extension](https://marketplace.visualstudio.com/publishers/psake) from the VS Code Marketplace
2. Make sure you have the [PowerShell extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell) installed
3. Open a project that contains a `psakefile.ps1` or `build.ps1`
4. The extension activates automatically—check the Explorer sidebar for the psake Tasks panel

That's it. No configuration required—but there's plenty available if you need it.

## Fully Configurable

The extension works out of the box, but every aspect of its behavior can be tuned to fit your workflow. Toggle CodeLens on or off, point to a custom PowerShell executable, pass extra parameters to `Invoke-psake` or your build script, and customize shell arguments—all without restarting VS Code.

For the full list of settings, check out the [VS Code extension docs](/docs/integrations/vscode-extension#configuration).

## Part of a Growing Ecosystem

The VS Code extension joins a growing set of tools designed to make psake easy to use wherever you are:

- **[psake](https://github.com/psake/psake)** — The build automation engine
- **[PowerShellBuild](https://github.com/psake/PowerShellBuild)** — Common build tasks for PowerShell modules
- **[psake Agent Skill](https://github.com/psake/psake-llm-tools)** — AI-assisted psake expertise for Claude and GitHub Copilot
- **[psake VS Code Extension](https://github.com/psake/psake-vscode)** — First-class editor integration

We're committed to making psake feel at home in every part of your development workflow. If you have ideas for where psake should go next, [open an issue](https://github.com/psake/psake-vscode/issues) or join the conversation.

Give the extension a try and let us know what you think!
5 changes: 5 additions & 0 deletions blog/tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ dotnet:
permalink: /dotnet
description: .NET framework and .NET Core development

vscode:
label: VS Code
permalink: /vscode
description: Visual Studio Code extension and editor integration

visual-studio:
label: Visual Studio
permalink: /visual-studio
Expand Down
4 changes: 4 additions & 0 deletions docs/integrations/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Editor & Tool Integration",
"position": 5
}
123 changes: 123 additions & 0 deletions docs/integrations/vscode-extension.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
---
sidebar_position: 1
title: VS Code Extension
description: Install and configure the psake VS Code extension for task discovery, CodeLens, and build automation directly in your editor.
---

# VS Code Extension

The [psake VS Code extension](https://github.com/psake/psake-vscode) integrates psake's build system directly into Visual Studio Code. It automatically discovers your tasks, provides a dedicated explorer panel, and lets you run builds without leaving the editor.

## Prerequisites

- [Visual Studio Code](https://code.visualstudio.com/) v1.90 or later
- [PowerShell extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell) for VS Code

## Installation

Install the extension from the [VS Code Marketplace](https://marketplace.visualstudio.com/publishers/psake), or search for **psake** in the Extensions panel (`Ctrl+Shift+X`).

The extension activates automatically when your workspace contains a `psakefile.ps1`, `psake.ps1`, or `build.ps1`.

## Features

### Task Provider

The extension scans your `psakefile.ps1` and registers all tasks with VS Code's task system. Your default task is mapped to the Build group, so pressing `Ctrl+Shift+B` runs it immediately.

Tasks refresh automatically when you save your build file.

You can also reference psake tasks in `.vscode/tasks.json`:

```json
{
"version": "2.0.0",
"tasks": [
{
"type": "psake",
"task": "Build"
}
]
}
```

### psake Tasks Explorer

A sidebar panel in the Explorer view lists all discovered tasks with their descriptions and dependencies. From here you can:

- **Run** any task with a single click
- **Navigate** to a task's definition in your build file
- **View** task dependencies at a glance

### CodeLens

Each `Task` declaration in your build file displays a **Run Task** action inline. Click it to execute the task directly from the editor.

To disable CodeLens, set `psake.codeLens.enabled` to `false`.

### Build Script Detection

If your project includes a wrapper script such as `build.ps1`, the extension routes execution through it automatically. This ensures bootstrapping, dependency installation, and other setup steps run correctly.

Set `psake.buildScript` to `"none"` to disable wrapper detection and call `Invoke-psake` directly.

### Task Sync & IntelliSense

- **Sync command**: Run `psake: Sync Tasks to tasks.json` to add all discovered tasks to your workspace configuration while preserving existing customizations.
- **IntelliSense**: The `"task"` property in `.vscode/tasks.json` provides autocomplete for psake task names when using the `psake` type.

### Snippets

Nine built-in snippets help you scaffold build files quickly:

| Prefix | Description |
|---|---|
| `psakeTask` | Basic task definition |
| `psakeTaskFull` | Task with all options |
| `psakeTaskDependsOnly` | Task that only declares dependencies |
| `psakeProperties` | Properties block |
| `psakeInclude` | Include statement |
| `psakeFramework` | Framework block |
| `psakeFormatTaskName` | FormatTaskName block |
| `psakeTaskSetup` | TaskSetup block |
| `psakeTaskTearDown` | TaskTearDown block |

### Scaffold Command

Run `psake: Install sample build file` to generate a starter `psakefile.ps1` with example tasks in your workspace.

## Configuration

All settings are under the `psake` namespace and update dynamically without restarting VS Code.

| Setting | Default | Description |
|---|---|---|
| `psake.buildFile` | `psakefile.ps1` | Default build file name |
| `psake.taskProvider.enabled` | `true` | Enable automatic task detection |
| `psake.codeLens.enabled` | `true` | Show Run Task CodeLens above task declarations |
| `psake.buildScript` | `""` (auto-detect) | Path to wrapper build script, or `"none"` to disable |
| `psake.buildScriptTaskParameter` | `Task` | Parameter name the build script uses for task selection |
| `psake.buildScriptParameters` | `""` | Additional parameters passed to the build script |
| `psake.invokeParameters` | `""` | Additional parameters passed to `Invoke-psake` |
| `psake.powershellExecutable` | `""` (auto-detect) | Path to PowerShell executable |
| `psake.shellArgs` | `["-NoProfile"]` | Arguments passed to the PowerShell executable |

## Troubleshooting

**Tasks not appearing?**
- Verify your build file is named `psakefile.ps1` (or matches your `psake.buildFile` setting)
- Check that `psake.taskProvider.enabled` is `true`
- Run `psake: Refresh Tasks` from the Command Palette

**Build script not detected?**
- The extension looks for `build.ps1` in the workspace root by default
- Set `psake.buildScript` explicitly if your wrapper has a different name or location

**Using a non-standard PowerShell?**
- Set `psake.powershellExecutable` to the full path of your PowerShell binary

## Further Reading

- [psake VS Code extension on GitHub](https://github.com/psake/psake-vscode)
- [Debugging psake in VS Code](../troubleshooting/debugging-guide.md)
- [psake Agent Skill for AI-assisted builds](/blog/introducing-psake-agent-skill)
7 changes: 7 additions & 0 deletions sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ const sidebars: SidebarsConfig = {
'ci-examples/team-city',
]
},
{
type: 'category',
label: 'Editor & Tool Integration',
items: [
'integrations/vscode-extension',
]
},
],

// PowerShellBuild - Companion module for building PowerShell modules
Expand Down