From 2afcc7dfa1cd3f6bfdf38b9c94e3b6bff07f3120 Mon Sep 17 00:00:00 2001
From: Michael Niksa <miniksa@microsoft.com>
Date: Fri, 24 May 2019 15:11:03 -0700
Subject: [PATCH 1/7] move version to vs2019, the 1903 sdk, and the 14.2 build
 tools.

---
 .../CascadiaPackage/CascadiaPackage.wapproj   | 32 ++++---------------
 .../WindowsTerminal/WindowsTerminal.vcxproj   |  6 ++--
 src/common.build.pre.props                    |  4 +--
 src/cppwinrt.build.pre.props                  |  7 ++--
 4 files changed, 14 insertions(+), 35 deletions(-)

diff --git a/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj b/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj
index 933b958ca62..83505567048 100644
--- a/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj
+++ b/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj
@@ -1,18 +1,15 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <Import Project="..\..\..\common.openconsole.props" Condition="'$(OpenConsoleDir)'==''" />
-
   <Import Project="$(OpenConsoleDir)src\wap-common.build.pre.props" />
-
   <PropertyGroup Label="Version">
     <!-- These fields are picked up by PackageES -->
     <VersionMajor>0</VersionMajor>
     <VersionMinor>1</VersionMinor>
   </PropertyGroup>
-
   <PropertyGroup Label="Configuration">
-    <TargetPlatformVersion>10.0.17763.0</TargetPlatformVersion>
-    <TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
+    <TargetPlatformVersion>10.0.18362.0</TargetPlatformVersion>
+    <TargetPlatformMinVersion>10.0.18362.0</TargetPlatformMinVersion>
     <!--
     These two properties are very important!
     Without them, msbuild will stomp MinVersion and MaxVersionTested in the
@@ -22,27 +19,22 @@
     <AppxOSMinVersionReplaceManifestVersion>false</AppxOSMinVersionReplaceManifestVersion>
     <AppxOSMaxVersionTestedReplaceManifestVersion>false</AppxOSMaxVersionTestedReplaceManifestVersion>
   </PropertyGroup>
-
   <PropertyGroup>
     <ProjectGuid>CA5CAD1A-224A-4171-B13A-F16E576FDD12</ProjectGuid>
     <EntryPointProjectUniqueName>..\WindowsTerminal\WindowsTerminal.vcxproj</EntryPointProjectUniqueName>
   </PropertyGroup>
-
   <PropertyGroup Condition="!Exists('CascadiaPackage_TemporaryKey.pfx')">
     <AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
     <AppxBundle>Never</AppxBundle>
   </PropertyGroup>
-
   <PropertyGroup Condition="Exists('CascadiaPackage_TemporaryKey.pfx')">
     <AppxPackageSigningEnabled>true</AppxPackageSigningEnabled>
     <AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
     <PackageCertificateKeyFile>CascadiaPackage_TemporaryKey.pfx</PackageCertificateKeyFile>
   </PropertyGroup>
-
   <ItemGroup Condition="Exists('CascadiaPackage_TemporaryKey.pfx')">
     <None Include="CascadiaPackage_TemporaryKey.pfx" />
   </ItemGroup>
-
   <ItemGroup>
     <AppxManifest Include="Package.appxmanifest" Condition="'$(WindowsTerminalReleaseBuild)'=='true'">
       <SubType>Designer</SubType>
@@ -51,7 +43,6 @@
       <SubType>Designer</SubType>
     </AppxManifest>
   </ItemGroup>
-
   <ItemGroup>
     <Content Include="Images\LargeTile.scale-100.png" />
     <Content Include="Images\LargeTile.scale-125.png" />
@@ -109,9 +100,7 @@
     <Content Include="ProfileIcons\{9acb9455-ca41-5af7-950f-6bca1bc9722f}.scale-200.png" />
     <PRIResource Include="Resources\en-US\Resources.resw" />
   </ItemGroup>
-
   <Import Project="$(OpenConsoleDir)src\wap-common.build.post.props" />
-
   <!--
     This exists to work around Microsoft/microsoft-ui-xaml#494.
     https://github.com/Microsoft/microsoft-ui-xaml/issues/494
@@ -142,29 +131,20 @@
     </ItemGroup>
   </Target>
   <!-- End workaround -->
-
   <ItemGroup>
     <ProjectReference Include="..\WindowsTerminal\WindowsTerminal.vcxproj" />
     <ProjectReference Include="..\..\host\exe\Host.EXE.vcxproj" />
   </ItemGroup>
-
   <!-- Stomp the path to conhost.exe.
     This task will copy OpenConsole.exe to the appx as conhost.exe, and place it
     adjacent to WindowsTerminal.exe.
    -->
   <Target Name="OpenConsoleStompSourceProjectForWapProject" BeforeTargets="_ConvertItems">
-    <ItemGroup>
-      <!-- Stomp all "SourceProject" values for all incoming dependencies to flatten the package. -->
-      <_TemporaryFilteredWapProjOutput
-        Include="@(_FilteredNonWapProjProjectOutput)" />
+    <ItemGroup><!-- Stomp all "SourceProject" values for all incoming dependencies to flatten the package. -->
+      <_TemporaryFilteredWapProjOutput Include="@(_FilteredNonWapProjProjectOutput)" />
       <_FilteredNonWapProjProjectOutput Remove="@(_TemporaryFilteredWapProjOutput)" />
-      <_FilteredNonWapProjProjectOutput Include="@(_TemporaryFilteredWapProjOutput)">
-        <!-- Override the filename for OpenConsole.exe (only) -->
-        <TargetPath Condition="'%(Filename)' == 'OpenConsole' and '%(Extension)' == '.exe'">conhost.exe</TargetPath>
-        <!-- Blank the SourceProject here to vend all files into the root of the pacakge. -->
+      <_FilteredNonWapProjProjectOutput Include="@(_TemporaryFilteredWapProjOutput)"><!-- Override the filename for OpenConsole.exe (only) --><TargetPath Condition="'%(Filename)' == 'OpenConsole' and '%(Extension)' == '.exe'">conhost.exe</TargetPath><!-- Blank the SourceProject here to vend all files into the root of the pacakge. -->
         <SourceProject></SourceProject>
       </_FilteredNonWapProjProjectOutput>
     </ItemGroup>
-  </Target>
-
-</Project>
+  </Target></Project>
\ No newline at end of file
diff --git a/src/cascadia/WindowsTerminal/WindowsTerminal.vcxproj b/src/cascadia/WindowsTerminal/WindowsTerminal.vcxproj
index da62d27440d..58bdb83d1e1 100644
--- a/src/cascadia/WindowsTerminal/WindowsTerminal.vcxproj
+++ b/src/cascadia/WindowsTerminal/WindowsTerminal.vcxproj
@@ -17,7 +17,7 @@
     <TargetName>WindowsTerminal</TargetName>
     <!-- IMPORTANT! Xaml Islands only works on >= 17709 -->
     <!-- IMPORTANT! cppwinrt.pre.props specifies 17134 -->
-    <WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
+    <WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <ItemDefinitionGroup>
     <ClCompile>
@@ -76,13 +76,11 @@
       <DeploymentContent>true</DeploymentContent>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </NativeReferenceFile>
-
     <!-- Manually include the xbf files from the app project as content files -->
     <NativeReferenceFile Include="$(OpenConsoleDir)$(Platform)\$(Configuration)\TerminalApp\*.xbf">
       <DeploymentContent>true</DeploymentContent>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </NativeReferenceFile>
-
     <!--
       the packaging project wont recurse through our dependencies, you have to
       make sure that if you add a cppwinrt dependency to any of these projects,
@@ -119,4 +117,4 @@
   </Target>
   <Import Project="$(OpenConsoleDir)src\common.build.post.props" />
   <Import Project="$(OpenConsoleDir)src\cppwinrt.build.post.props" />
-</Project>
+</Project>
\ No newline at end of file
diff --git a/src/common.build.pre.props b/src/common.build.pre.props
index d7853a892c1..5cae9bf7934 100644
--- a/src/common.build.pre.props
+++ b/src/common.build.pre.props
@@ -40,10 +40,10 @@
     </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
-    <WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
+    <WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <PropertyGroup Label="Configuration">
-    <PlatformToolset>v141</PlatformToolset>
+    <PlatformToolset>v142</PlatformToolset>
     <CharacterSet>Unicode</CharacterSet>
     <LinkIncremental>false</LinkIncremental>
   </PropertyGroup>
diff --git a/src/cppwinrt.build.pre.props b/src/cppwinrt.build.pre.props
index 509d83cbcba..f937c4f6bf4 100644
--- a/src/cppwinrt.build.pre.props
+++ b/src/cppwinrt.build.pre.props
@@ -8,8 +8,9 @@
   <PropertyGroup Label="Globals">
     <!-- 17134 is RS4 -->
     <!-- 17763 is RS5 -->
-    <WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.17763.0</WindowsTargetPlatformVersion>
-    <WindowsTargetPlatformMinVersion>10.0.17763.0</WindowsTargetPlatformMinVersion>
+    <!-- 18362 is 19H1 -->
+    <WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.18362.0</WindowsTargetPlatformVersion>
+    <WindowsTargetPlatformMinVersion>10.0.18362.0</WindowsTargetPlatformMinVersion>
     <CppWinRTEnabled>true</CppWinRTEnabled>
     <CppWinRTOptimized>true</CppWinRTOptimized>
     <DefaultLanguage>en-US</DefaultLanguage>
@@ -73,7 +74,7 @@
 
   <PropertyGroup Label="Configuration">
     <ConfigurationType Condition="'$(ConfigurationType)'==''">DynamicLibrary</ConfigurationType>
-    <PlatformToolset>v141</PlatformToolset>
+    <PlatformToolset>v142</PlatformToolset>
     <CharacterSet>Unicode</CharacterSet>
     <GenerateManifest>false</GenerateManifest>
   </PropertyGroup>

From 4ed600efd36158f40b1b90643cf42d20c36b494a Mon Sep 17 00:00:00 2001
From: Michael Niksa <miniksa@microsoft.com>
Date: Fri, 24 May 2019 15:20:29 -0700
Subject: [PATCH 2/7] Use the 2019 hosted pool.

---
 build/pipelines/templates/build-console-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build/pipelines/templates/build-console-ci.yml b/build/pipelines/templates/build-console-ci.yml
index a4ac7b6d8e2..34c8d09add7 100644
--- a/build/pipelines/templates/build-console-ci.yml
+++ b/build/pipelines/templates/build-console-ci.yml
@@ -9,7 +9,7 @@ jobs:
   variables:
     BuildConfiguration: ${{ parameters.configuration }}
     BuildPlatform: ${{ parameters.platform }}
-  pool: { vmImage: vs2017-win2016 }
+  pool: { vmImage: windows-2019 }
 
   steps:
   - template: build-console-steps.yml

From c0362471927974ff6bbca19f4b2741fad99ce554 Mon Sep 17 00:00:00 2001
From: Michael Niksa <miniksa@microsoft.com>
Date: Thu, 30 May 2019 08:57:26 -0700
Subject: [PATCH 3/7] Fix weird spacing behavior for stomp wap project block.

---
 .../CascadiaPackage/CascadiaPackage.wapproj   | 23 +++++++++++--------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj b/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj
index 83505567048..05864804881 100644
--- a/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj
+++ b/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj
@@ -139,12 +139,17 @@
     This task will copy OpenConsole.exe to the appx as conhost.exe, and place it
     adjacent to WindowsTerminal.exe.
    -->
-  <Target Name="OpenConsoleStompSourceProjectForWapProject" BeforeTargets="_ConvertItems">
-    <ItemGroup><!-- Stomp all "SourceProject" values for all incoming dependencies to flatten the package. -->
-      <_TemporaryFilteredWapProjOutput Include="@(_FilteredNonWapProjProjectOutput)" />
-      <_FilteredNonWapProjProjectOutput Remove="@(_TemporaryFilteredWapProjOutput)" />
-      <_FilteredNonWapProjProjectOutput Include="@(_TemporaryFilteredWapProjOutput)"><!-- Override the filename for OpenConsole.exe (only) --><TargetPath Condition="'%(Filename)' == 'OpenConsole' and '%(Extension)' == '.exe'">conhost.exe</TargetPath><!-- Blank the SourceProject here to vend all files into the root of the pacakge. -->
-        <SourceProject></SourceProject>
-      </_FilteredNonWapProjProjectOutput>
-    </ItemGroup>
-  </Target></Project>
\ No newline at end of file
+  <Target Name="OpenConsoleStompSourceProjectForWapProject" BeforeTargets="_ConvertItems">
+    <ItemGroup>
+      <!-- Stomp all "SourceProject" values for all incoming dependencies to flatten the package. -->
+      <_TemporaryFilteredWapProjOutput Include="@(_FilteredNonWapProjProjectOutput)" />
+      <_FilteredNonWapProjProjectOutput Remove="@(_TemporaryFilteredWapProjOutput)" />
+      <_FilteredNonWapProjProjectOutput Include="@(_TemporaryFilteredWapProjOutput)">
+        <!-- Override the filename for OpenConsole.exe (only) -->
+        <TargetPath Condition="'%(Filename)' == 'OpenConsole' and '%(Extension)' == '.exe'">conhost.exe</TargetPath>
+        <!-- Blank the SourceProject here to vend all files into the root of the package. -->
+        <SourceProject></SourceProject>
+      </_FilteredNonWapProjProjectOutput>
+    </ItemGroup>
+  </Target>
+</Project>

From 62fdd44f0b693915c183ffa651ea3b9dbc147f08 Mon Sep 17 00:00:00 2001
From: Dustin Howett <duhowett@microsoft.com>
Date: Wed, 19 Jun 2019 08:25:18 -0700
Subject: [PATCH 4/7] yml: bump vs version to 16 as well

---
 build/pipelines/templates/build-console-steps.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build/pipelines/templates/build-console-steps.yml b/build/pipelines/templates/build-console-steps.yml
index 225b5b7c27e..ec26880be43 100644
--- a/build/pipelines/templates/build-console-steps.yml
+++ b/build/pipelines/templates/build-console-steps.yml
@@ -39,7 +39,7 @@ steps:
   displayName: 'Build solution **\OpenConsole.sln'
   inputs:
     solution: '**\OpenConsole.sln'
-    vsVersion: 15.0
+    vsVersion: 16.0
     platform: '$(BuildPlatform)'
     configuration: '$(BuildConfiguration)'
     msbuildArgs: ${{ parameters.additionalBuildArguments }}

From ded8b812f117feba82957e7a902a72129c26653b Mon Sep 17 00:00:00 2001
From: "Dustin L. Howett (MSFT)" <duhowett@microsoft.com>
Date: Mon, 24 Jun 2019 17:29:53 -0700
Subject: [PATCH 5/7] Switch audit to 16.0 as well

---
 build/pipelines/templates/build-console-audit-job.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build/pipelines/templates/build-console-audit-job.yml b/build/pipelines/templates/build-console-audit-job.yml
index b5bb0699c42..d3ace87e753 100644
--- a/build/pipelines/templates/build-console-audit-job.yml
+++ b/build/pipelines/templates/build-console-audit-job.yml
@@ -45,7 +45,7 @@ jobs:
     displayName: 'Build solution **\OpenConsole.sln'
     inputs:
       solution: '**\OpenConsole.sln'
-      vsVersion: 15.0
+      vsVersion: 16.0
       platform: '$(BuildPlatform)'
       configuration: '$(BuildConfiguration)'
       msbuildArgs: ${{ parameters.additionalBuildArguments }}

From f1fc679074fa7afc6283101e1fef82ac786441f4 Mon Sep 17 00:00:00 2001
From: "Dustin L. Howett (MSFT)" <duhowett@microsoft.com>
Date: Tue, 25 Jun 2019 11:28:04 -0700
Subject: [PATCH 6/7] once more into the breach

---
 build/pipelines/templates/build-console-audit-job.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build/pipelines/templates/build-console-audit-job.yml b/build/pipelines/templates/build-console-audit-job.yml
index d3ace87e753..9a4ae932dd3 100644
--- a/build/pipelines/templates/build-console-audit-job.yml
+++ b/build/pipelines/templates/build-console-audit-job.yml
@@ -8,7 +8,7 @@ jobs:
   variables:
     BuildConfiguration: AuditMode
     BuildPlatform: ${{ parameters.platform }}
-  pool: { vmImage: vs2017-win2016 }
+  pool: { vmImage: windows-2019 }
 
   steps:
   - checkout: self

From f79d01ee7a9071694b5af74345c5d63f02d9e9a5 Mon Sep 17 00:00:00 2001
From: Michael Niksa <miniksa@microsoft.com>
Date: Tue, 25 Jun 2019 13:42:14 -0700
Subject: [PATCH 7/7] check formatting build onto 2019 too.

---
 build/pipelines/templates/check-formatting.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build/pipelines/templates/check-formatting.yml b/build/pipelines/templates/check-formatting.yml
index e06af4e8e3d..b60c6041aa1 100644
--- a/build/pipelines/templates/check-formatting.yml
+++ b/build/pipelines/templates/check-formatting.yml
@@ -2,7 +2,7 @@
 jobs:
 - job: CodeFormatCheck
   displayName: Proper Code Formatting Check
-  pool: { vmImage: vs2017-win2016 }
+  pool: { vmImage: windows-2019 }
 
   steps:
   - checkout: self