Move the solution to VS2019 and v142 toolset
As mentioned in README, (also related to #534)
If you're running VS2019, you'll also need to install the "v141 Toolset" and "Visual C++ ATL for x86 and x64"
But actually v141 Toolset is not required in VS2019. The following are the configurations of my VS2019 and I can build the solution successfully.
C++ Desktop development

UWP development

Individual components

To build the solution in VS2019, you need to have:
- Windows 10 version 1903
- Windows 10 SDK (10.0.18362.0)
- VS2019 with C++ Desktop and UWP development workloads, as shown in the above screenshots
And retarget the solution to v142 platform and the latest Windows SDK.
git clone https://github.com/microsoft/Terminal.git
cd Terminal
git submodule init
git submodule update
nuget restore OpenConsole.sln
msbuild /p:Configuration=Release;AppxBundle=Always;AppxBundlePlatforms="x64" /p:Platform=x64 /p:PlatformToolset=v142 /p:TargetPlatformVersion=10.0.18362.0 /p:PreferredToolArchitecture=x64 OpenConsole.sln
Consider the README instructions as minimal build environment requirements. And v142 > v141.
Might be, but it's still very misleading. If you have VS 2019, you don't need the v141 tools, because it should install either v141 or v142 by default anyway. My first impression was also that I'd have to install those, too.
@chunliu consider renaming this issue to "Move to VS2019 and v142 toolset" to be more directed at what is proposed.
@fcharlie Did you run in Command Prompt for VS or cmd?
@fcharlie Did you run in Command Prompt for VS or cmd?
If you run tools/razzle.cmd before what @fcharlie runs you can do it in cmd and not need the 'for VS' one (basically sets all the paths just in case)
@timheuer if the source solution is moved to VS2019 and v142, people with VS2017 could have problem to build it as v142 toolset might not be installed on VS2017.
I think the proper way to address the building issue of VS2019 is to keep the source solution targeting on VS2017 and v141 toolset, but include the proper instructions for VS2019 and v142 toolset in README. The team can retarget the source solution when they don't need to support VS2017 anymore.
@jongio I tried it with VS2019 command prompt and it is working fine. You need to include the path .\dep\nuget\ for nuget command.
git clone https://github.com/microsoft/Terminal.git cd Terminal git submodule init git submodule update nuget restore OpenConsole.sln msbuild /p:Configuration=Release /p:Platform=x64 /p:PlatformToolset=v142 /p:TargetPlatformVersion=10.0.18362.0 /p:PreferredToolArchitecture=x64 OpenConsole.sln
this worked, but how do I deploy? OpenConsole.exe starts old console
@snooopcatt My notebook is too old, I have not tried how to package and deploy it on the command line.
@snooopcatt the easiest way is to package or deploy it with Visual Studio.
@snooopcatt there is a PowerShell script in build/scripts/Create-AppxBundle.ps1. I didn't try it, but maybe you can use it to package the app from command line.
I have thousands of "error MIDL2003: [msg]redefinition [context]".
I 'm using VS 2019, v142 and SDK 10.0.18362
I can build it using SDK 10.0.17663 and v142
git clone https://github.com/microsoft/Terminal.git cd Terminal git submodule init git submodule update nuget restore OpenConsole.sln msbuild /p:Configuration=Release /p:Platform=x64 /p:PlatformToolset=v142 /p:TargetPlatformVersion=10.0.18362.0 /p:PreferredToolArchitecture=x64 OpenConsole.slnthis worked, but how do I deploy? OpenConsole.exe starts old console
Don't you need to press CTRL+T to start a new tab?
I have a error MIDL2011 [msg]unresolved type declaration [context]: Windows.UI.Xaml.Markup.IXamlMetadataProvider [ RuntimeClass 'TerminalApp.XamlMetaDataProvider' ] TerminalApp F:\GitHub\Terminal\src\cascadia\TerminalApp\x64\Release\XamlMetaDataProvider.idl 6

@YYYGH and @12101111 Did you retarget the solution to the latest Windows SDK and v142 platform in Visual Studio?
@YYYGH and @12101111 Did you retarget the solution to the latest Windows SDK and v142 platform in Visual Studio?
thank you! I renew the solution config and is build success.
but can't run WindowsTerminal.exe, is no reaction.
windows 10 version: 1803
@YYYGH to run it, you need Windows 10 1903 with Developer mode on. Then you can right click the solution in VS and choose Deploy Solution.
@YYYGH to run it, you need Windows 10 1903 with Developer mode on. Then you can right click the solution in VS and choose Deploy Solution.
Thanks very much!
git clone https://github.com/microsoft/Terminal.git cd Terminal git submodule init git submodule update nuget restore OpenConsole.sln msbuild /p:Configuration=Release /p:Platform=x64 /p:PlatformToolset=v142 /p:TargetPlatformVersion=10.0.18362.0 /p:PreferredToolArchitecture=x64 OpenConsole.sln
Thanks!
I'm not able to deploy the WindowsTerminal. I'm getting the following error telling me that the deployment target should be running on 10.0.18362.0 or higher
Though, in the project settings, the target SDK is 10.0.17763

And I'm sure that my Windows is running that version.

I'm not sure where is the error coming from!