Skip to content

Latest commit

 

History

History
60 lines (43 loc) · 2.02 KB

File metadata and controls

60 lines (43 loc) · 2.02 KB

To generate the Visual Studio solution file (node.sln) without building Node.js:

1. Prerequisites

  • Visual Studio 2022 or 2025/2026 (Community/Pro/Enterprise) with C++ desktop development workload installed (you need the Visual C++ tools).
  • Python 3.x (Node.js build system requires it).
  • Open the Developer Command Prompt for VS 2026 (important — it sets up the compiler environment).

2. Generate the Solution (Recommended Command)

Navigate to the root of your Node.js source folder (where vcbuild.bat is) and run:

vcbuild.bat nobuild projgen

For x64 (most common):

vcbuild.bat nobuild projgen

For x86:

vcbuild.bat x86 nobuild projgen

If you want to use Clang-CL (faster in some cases):

vcbuild.bat clang-cl nobuild projgen

This will:

  • Run the configure step (GYP / GN).
  • Generate node.sln + many .vcxproj files.
  • Skip the actual build.

3. Open in Visual Studio

  1. Double-click node.sln in the root folder.
  2. In Solution Explorer, right-click the "node" project → Set as Startup Project.
  3. You can now browse the full source, set breakpoints, etc.

Useful Extra Options

Option Purpose
dll Build libnode.dll (shared) instead of static
vs2022 / vs2025 Force specific VS version
debug Generate Debug configuration
release Generate Release configuration

Example: vcbuild.bat nobuild projgen dll

Notes

  • The first time you open the solution, Visual Studio may take a while to parse all the projects.
  • You don't need to build from the command line if you only want to explore/edit in VS.
  • If you later want to build from VS: Build → Build Solution (or just build the node project).

This is the standard/official way used by Node.js core developers on Windows. Let me know if you hit any specific error!