Skip to content

Add .vscode settings/scripts to support VS Code#332

Open
KonradBreitsprecherBkd wants to merge 4 commits into
mainfrom
dev/vs-code-settings
Open

Add .vscode settings/scripts to support VS Code#332
KonradBreitsprecherBkd wants to merge 4 commits into
mainfrom
dev/vs-code-settings

Conversation

@KonradBreitsprecherBkd
Copy link
Copy Markdown
Contributor

@KonradBreitsprecherBkd KonradBreitsprecherBkd commented Jun 3, 2026

Problem

https://github.com/vectorgrp/sil-kit-planning/issues/102

CMake configure and build worked only when VS Code inherited an already-initialized Visual Studio developer environment, for example when started from a VS Developer Console.

This caused failures in normal VS Code sessions, especially for CMake Tools commands and task execution.

PR Summary

This PR adds a portable VS Code CMake workflow for Windows and MSVC so the repository can be configured and built without launching VS Code from a Visual Studio Developer Prompt.

It standardizes how CMake is invoked in VS Code by bootstrapping the Visual Studio environment automatically through committed workspace configuration in .vscode.

What Changed

  • Added a CMake wrapper script at .vscode/cmake-vs.cmd that:
    • locates Visual Studio via vswhere
    • initializes VsDevCmd.bat for x64
    • forwards all CMake arguments
  • Updated workspace settings in .vscode/settings.json:
    • cmake.useCMakePresets is set to always
    • cmake.cmakePath points to the wrapper script so CMake Tools commands use the same environment bootstrap path
  • .vscode/vs-dev-shell.ps1 for terminal usage. Opening a default terminal now loads the Visual Studio dev environment

Notes

  • This change is workspace-scoped and portable across contributors using Visual Studio Build Tools or Visual Studio with vswhere and MSVC components installed.
  • Existing CMake presets remain unchanged.

…/build with VS Code

Signed-off-by: Konrad Breitsprecher <Konrad.Breitsprecher@vector.com>
Signed-off-by: Konrad Breitsprecher <Konrad.Breitsprecher@vector.com>
Signed-off-by: Konrad Breitsprecher <Konrad.Breitsprecher@vector.com>
@KonradBreitsprecherBkd KonradBreitsprecherBkd changed the title Add .vscode setting/scripts to support VS Code Add .vscode settings/scripts to support VS Code Jun 3, 2026
Signed-off-by: Konrad Breitsprecher <Konrad.Breitsprecher@vector.com>
@snps-fiodorov snps-fiodorov requested review from snps-behrens and removed request for snps-fiodorov June 3, 2026 13:44
@KonradBreitsprecherBkd KonradBreitsprecherBkd added the needs reviewer This issue is looking for a reviewer. label Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs reviewer This issue is looking for a reviewer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant