Guide for build and installation #723

Open
opened 2026-01-30 22:00:44 +00:00 by claunia · 0 comments
Owner

Originally created by @ZgblKylin on GitHub (May 7, 2019).

Tools needed

  1. VS2017 or higher with the following packages ("Workloads" tab in Visual Studio Installer) :
    1.1 Desktop Development with C++.
    1.2 Universal Windows Platform Development.
    1.3 Windows 10 SDK (10.0.18362.0).
    1.4 If you're running VS2019, you'll also need to install either v141 Toolset or v142 Toolset.
  2. Git command-line tool.
  3. Nuget.exe (Needed in build step 3, can be found in Terminal/dep/nuget).

Build Steps

  1. git clone this repository, not download .zip file.
  2. Run git submodule update --init --recursive in Terminal folder.
  3. Run nuget restore OpenConsole.sln (This step can be skipped, then Visual Studio should warn you that there are packages to restore - then restore).
  4. Open OpenConsole.sln with Visual Studio.
  5. Build whole solution(F7) with your platform(x86/x64) and release mode, you may need to fix some build errors:
    5.1 C2220 and code page warnings: All errors and warnings are encoding error of unicode characters, a helpful workaround is to modify corresponding file encoding to UTF-8 BOM (Notepad++ is recommended).
    5.2 Errors in src/tools/vtpipeterm/main.cpp: In addtion, you should also add u8 prefix before string literals with unicode characters, e.g. line 395, 398, 401 and 404.

Workaround

Try build with PR 458 or PR 549, both of them can build successfully.

Installation

Unfortunately, the generated .appx doesn't have any certificates, so it cannot be installed via double-click or powershell, the only way to install is to deploy the solution in VS.

  1. Open Windows Settings - Upgrade & Security - For Developers, switch App sources to Developer mode.
  2. Right click on CascadiaPackage project (under Solution/Terminal), select Deploy Solution to install, then you'll find Windows Terminal (Preview) in start menu.

Settings

After open the terminal, you can't see any menu buttons.

Just press Ctrl + T to open a new tab, and you'll see a drop-down button in the tab bar.

Click it and select Settings, then you can modify the configuration via opened profiles.json.

Add WSL

  1. Create a new session in profiles, with content copied from profiles/cmd.
  2. Give it a new guid.
  3. Give it a new name, such as WSL.
  4. Specify its commandline to wsl.exe.

Then you'll find WSL in the drop-down menu of tab bar.

Here're sample codes:

{
    "guid": "{09dc5eef-6840-4050-ae69-21e55e6a2e62}",
    "name": "WSL",
    "colorscheme": "Campbell",
    "historySize": 9001,
    "snapOnInput": true,
    "cursorColor": "#FFFFFF",
    "cursorShape": "bar",
    "commandline": "wsl.exe",
    "fontFace": "Consolas",
    "fontSize": 12,
    "acrylicOpacity": 0.75,
    "useAcrylic": true,
    "closeOnExit": false,
    "padding": "0, 0, 0, 0"
}
Originally created by @ZgblKylin on GitHub (May 7, 2019). # Tools needed 1. VS2017 or higher with the following packages ("Workloads" tab in Visual Studio Installer) : 1.1 `Desktop Development with C++`. 1.2 `Universal Windows Platform Development`. 1.3 `Windows 10 SDK (10.0.18362.0)`. 1.4 If you're running VS2019, you'll also need to install either `v141 Toolset` or `v142 Toolset`. 2. Git command-line tool. 3. Nuget.exe (Needed in build step 3, can be found in `Terminal/dep/nuget`). # Build Steps 1. `git clone` this repository, not download .zip file. 2. Run `git submodule update --init --recursive` in Terminal folder. 3. Run `nuget restore OpenConsole.sln` (This step can be skipped, then Visual Studio should warn you that there are packages to restore - then restore). 4. Open `OpenConsole.sln` with Visual Studio. 5. Build whole solution(F7) with your platform(`x86`/`x64`) and `release` mode, you may need to fix some build errors: 5.1 C2220 and code page warnings: All errors and warnings are encoding error of unicode characters, a helpful workaround is to modify corresponding file encoding to `UTF-8 BOM` (Notepad++ is recommended). 5.2 Errors in `src/tools/vtpipeterm/main.cpp`: In addtion, you should also add `u8` prefix before string literals with unicode characters, e.g. line `395`, `398`, `401` and `404`. ## Workaround Try build with [PR 458](https://github.com/microsoft/Terminal/pull/458) or [PR 549](https://github.com/microsoft/Terminal/pull/549), both of them can build successfully. # Installation Unfortunately, the generated .appx doesn't have any certificates, so it cannot be installed via double-click or powershell, the only way to install is to deploy the solution in VS. 1. Open `Windows Settings` - `Upgrade & Security` - `For Developers`, switch `App sources` to `Developer mode`. 2. Right click on `CascadiaPackage` project (under `Solution/Terminal`), select `Deploy Solution` to install, then you'll find `Windows Terminal (Preview)` in start menu. # Settings After open the terminal, you can't see any menu buttons. Just press `Ctrl + T` to open a new tab, and you'll see a drop-down button in the tab bar. Click it and select `Settings`, then you can modify the configuration via opened `profiles.json`. ## Add WSL 1. Create a new session in `profiles`, with content copied from `profiles/cmd`. 2. Give it a new `guid`. 3. Give it a new `name`, such as `WSL`. 4. Specify its `commandline` to `wsl.exe`. Then you'll find `WSL` in the drop-down menu of tab bar. Here're sample codes: ```json { "guid": "{09dc5eef-6840-4050-ae69-21e55e6a2e62}", "name": "WSL", "colorscheme": "Campbell", "historySize": 9001, "snapOnInput": true, "cursorColor": "#FFFFFF", "cursorShape": "bar", "commandline": "wsl.exe", "fontFace": "Consolas", "fontSize": 12, "acrylicOpacity": 0.75, "useAcrylic": true, "closeOnExit": false, "padding": "0, 0, 0, 0" } ```
claunia added the Needs-Tag-FixProduct-TerminalIssue-DocsArea-Build labels 2026-01-30 22:00:44 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#723