<p dir="auto">I'm trying to build Windows Terminal from command line using VS 2017 on Windows 10 x64 insider, build 18362.86. I kept getting the error below even after installing all the VS 2017 components that have something to do with C++ and .Net. From the error message it seems the build surprisingly involves VS 2019 (which I have installed as well). My expectation is VS 2019 should not be involved as I use VS 2017 command line.  I then decided to install all the components that have something to do with C++ and .Net for VS 2019. I still get the same error message.</p>
<p dir="auto">My steps for building:</p>
<ol dir="auto">
<li>Clone the repo from github</li>
<li>Do <code class="notranslate">git submodule update --init --recursive</code></li>
<li>Do <code class="notranslate">.\tools\razzle.cmd</code></li>
<li>Do <code class="notranslate">bcz</code></li>
</ol>
<p dir="auto">What am I missing? The error message is as below:<br>
<code class="notranslate">C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v150\Microsoft.CppCommon.targets(2128,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\WindowsXaml\v15.0\Microsoft.Windows.UI.Xaml.Cpp.targets" was not found. Confirm that the path in the &lt;Import&gt; declaration is correct, and that the file exists on disk. [c:\Users\Tembo\Desktop\qnd\cpp\Terminal10\src\cascadia\TerminalSetting\TerminalSettings.vcxproj]</code></p>
<h1 dir="auto">Tools needed</h1>
<ol dir="auto">
<li>VS2017 or higher with the following packages ("Workloads" tab in Visual Studio Installer) :<br>
1.1 <code class="notranslate">Desktop Development with C++</code>.<br>
1.2 <code class="notranslate">Universal Windows Platform Development</code>.<br>
1.3 <code class="notranslate">Windows 10 SDK (10.0.18362.0)</code>.<br>
1.4 If you're running VS2019, you'll also need to install either <code class="notranslate">v141 Toolset</code> or <code class="notranslate">v142 Toolset</code>.</li>
<li>Git command-line tool.</li>
<li>Nuget.exe (Needed in build step 3, can be found in <code class="notranslate">Terminal/dep/nuget</code>).</li>
</ol>
<h1 dir="auto">Build Steps</h1>
<ol dir="auto">
<li><code class="notranslate">git clone</code> this repository, not download .zip file.</li>
<li>Run <code class="notranslate">git submodule update --init --recursive</code> in Terminal folder.</li>
<li>Run <code class="notranslate">nuget restore OpenConsole.sln</code> (This step can be skipped, then Visual Studio should warn you that there are packages to restore - then restore).</li>
<li>Open <code class="notranslate">OpenConsole.sln</code> with Visual Studio.</li>
<li>Build whole solution(F7) with your platform(<code class="notranslate">x86</code>/<code class="notranslate">x64</code>) and <code class="notranslate">release</code> mode, you may need to fix some build errors:<br>
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 <code class="notranslate">UTF-8 BOM</code> (Notepad++ is recommended).<br>
5.2 Errors in <code class="notranslate">src/tools/vtpipeterm/main.cpp</code>: In addtion, you should also add <code class="notranslate">u8</code> prefix before string literals with unicode characters, e.g. line <code class="notranslate">395</code>, <code class="notranslate">398</code>, <code class="notranslate">401</code> and <code class="notranslate">404</code>.</li>
</ol>
<h2 dir="auto">Workaround</h2>
<p dir="auto">Try build with <a href="https://github.com/microsoft/Terminal/pull/458" data-hovercard-type="pull_request" data-hovercard-url="/microsoft/terminal/pull/458/hovercard">PR 458</a> or <a href="https://github.com/microsoft/Terminal/pull/549" data-hovercard-type="pull_request" data-hovercard-url="/microsoft/terminal/pull/549/hovercard">PR 549</a>, both of them can build successfully.</p>
<h1 dir="auto">Installation</h1>
<p dir="auto">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.</p>
<ol dir="auto">
<li>Open <code class="notranslate">Windows Settings</code> - <code class="notranslate">Upgrade &amp; Security</code> - <code class="notranslate">For Developers</code>, switch <code class="notranslate">App sources</code> to <code class="notranslate">Developer mode</code>.</li>
<li>Right click on <code class="notranslate">CascadiaPackage</code> project (under <code class="notranslate">Solution/Terminal</code>), select <code class="notranslate">Deploy Solution</code> to install, then you'll find <code class="notranslate">Windows Terminal (Preview)</code> in start menu.</li>
</ol>
<h1 dir="auto">Settings</h1>
<p dir="auto">After open the terminal, you can't see any menu buttons.</p>
<p dir="auto">Just press <code class="notranslate">Ctrl + T</code> to open a new tab, and you'll see a drop-down button in the tab bar.</p>
<p dir="auto">Click it and select <code class="notranslate">Settings</code>, then you can modify the configuration via opened <code class="notranslate">profiles.json</code>.</p>
<h2 dir="auto">Add WSL</h2>
<ol dir="auto">
<li>Create a new session in <code class="notranslate">profiles</code>, with content copied from <code class="notranslate">profiles/cmd</code>.</li>
<li>Give it a new <code class="notranslate">guid</code>.</li>
<li>Give it a new <code class="notranslate">name</code>, such as <code class="notranslate">WSL</code>.</li>
<li>Specify its <code class="notranslate">commandline</code> to <code class="notranslate">wsl.exe</code>.</li>
</ol>
<p dir="auto">Then you'll find <code class="notranslate">WSL</code> in the drop-down menu of tab bar.</p>
<p dir="auto">Here're sample codes:</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
    &quot;guid&quot;: &quot;{09dc5eef-6840-4050-ae69-21e55e6a2e62}&quot;,
    &quot;name&quot;: &quot;WSL&quot;,
    &quot;colorscheme&quot;: &quot;Campbell&quot;,
    &quot;historySize&quot;: 9001,
    &quot;snapOnInput&quot;: true,
    &quot;cursorColor&quot;: &quot;#FFFFFF&quot;,
    &quot;cursorShape&quot;: &quot;bar&quot;,
    &quot;commandline&quot;: &quot;wsl.exe&quot;,
    &quot;fontFace&quot;: &quot;Consolas&quot;,
    &quot;fontSize&quot;: 12,
    &quot;acrylicOpacity&quot;: 0.75,
    &quot;useAcrylic&quot;: true,
    &quot;closeOnExit&quot;: false,
    &quot;padding&quot;: &quot;0, 0, 0, 0&quot;
}"><pre class="notranslate">{
    <span class="pl-ent">"guid"</span>: <span class="pl-s"><span class="pl-pds">"</span>{09dc5eef-6840-4050-ae69-21e55e6a2e62}<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>WSL<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"colorscheme"</span>: <span class="pl-s"><span class="pl-pds">"</span>Campbell<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"historySize"</span>: <span class="pl-c1">9001</span>,
    <span class="pl-ent">"snapOnInput"</span>: <span class="pl-c1">true</span>,
    <span class="pl-ent">"cursorColor"</span>: <span class="pl-s"><span class="pl-pds">"</span>#FFFFFF<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"cursorShape"</span>: <span class="pl-s"><span class="pl-pds">"</span>bar<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"commandline"</span>: <span class="pl-s"><span class="pl-pds">"</span>wsl.exe<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"fontFace"</span>: <span class="pl-s"><span class="pl-pds">"</span>Consolas<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"fontSize"</span>: <span class="pl-c1">12</span>,
    <span class="pl-ent">"acrylicOpacity"</span>: <span class="pl-c1">0.75</span>,
    <span class="pl-ent">"useAcrylic"</span>: <span class="pl-c1">true</span>,
    <span class="pl-ent">"closeOnExit"</span>: <span class="pl-c1">false</span>,
    <span class="pl-ent">"padding"</span>: <span class="pl-s"><span class="pl-pds">"</span>0, 0, 0, 0<span class="pl-pds">"</span></span>
}</pre></div>