Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move the solution to VS2019 and v142 toolset #565

Closed
chunliu opened this issue May 8, 2019 · 36 comments · Fixed by #1012
Closed

Move the solution to VS2019 and v142 toolset #565

chunliu opened this issue May 8, 2019 · 36 comments · Fixed by #1012
Assignees
Labels
Area-Build Issues pertaining to the build system, CI, infrastructure, meta Issue-Task It's a feature request, but it doesn't really need a major design. Product-Conhost For issues in the Console codebase Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Milestone

Comments

@chunliu
Copy link

chunliu commented May 8, 2019

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
image

UWP development
image

Individual components
image

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.

@fcharlie
Copy link
Contributor

fcharlie commented May 8, 2019

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

@MarioLiebisch
Copy link

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.

@timheuer
Copy link
Member

timheuer commented May 8, 2019

@chunliu consider renaming this issue to "Move to VS2019 and v142 toolset" to be more directed at what is proposed.

@jongio
Copy link

jongio commented May 8, 2019

@fcharlie Did you run in Command Prompt for VS or cmd?

@timheuer
Copy link
Member

timheuer commented May 8, 2019

@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)

@chunliu
Copy link
Author

chunliu commented May 8, 2019

@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.

@chunliu
Copy link
Author

chunliu commented May 8, 2019

@jongio I tried it with VS2019 command prompt and it is working fine. You need to include the path .\dep\nuget\ for nuget command.

@chunliu chunliu changed the title v141 toolset is not required in VS2019 README should include guidance for building the solution with VS2019 and v142 toolset May 8, 2019
@snooopcatt
Copy link

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

@fcharlie
Copy link
Contributor

fcharlie commented May 9, 2019

@snooopcatt My notebook is too old, I have not tried how to package and deploy it on the command line.

@chunliu
Copy link
Author

chunliu commented May 9, 2019

@snooopcatt the easiest way is to package or deploy it with Visual Studio.

@chunliu
Copy link
Author

chunliu commented May 9, 2019

@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.

@12101111
Copy link

12101111 commented May 9, 2019

图片
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

@Tuumke
Copy link

Tuumke commented May 9, 2019

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

Don't you need to press CTRL+T to start a new tab?

@YYYGH
Copy link

YYYGH commented May 10, 2019

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
image

@chunliu
Copy link
Author

chunliu commented May 10, 2019

@YYYGH and @12101111 Did you retarget the solution to the latest Windows SDK and v142 platform in Visual Studio?

@YYYGH
Copy link

YYYGH commented May 10, 2019

@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.
image
but can't run WindowsTerminal.exe, is no reaction.
windows 10 version: 1803

@chunliu
Copy link
Author

chunliu commented May 10, 2019

@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
Copy link

YYYGH commented May 10, 2019

@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!

@JushPush
Copy link

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!

@Backer-Sultan
Copy link

Backer-Sultan commented May 12, 2019

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
image
Though, in the project settings, the target SDK is 10.0.17763
image

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

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

@MarioLiebisch
Copy link

@Backer-Sultan The error message is correct. It's not just an SDK thing (the "target" you select). It's also a functionality thing. You'll need Windows 10 version 1903 (i.e. the May 2019 update) for this to be deployable and functional.

@Backer-Sultan
Copy link

@Backer-Sultan The error message is correct. It's not just an SDK thing (the "target" you select). It's also a functionality thing. You'll need Windows 10 version 1903 (i.e. the May 2019 update) for this to be deployable and functional.

Thank you for the clarification! The May 2019 update is still not available for me for some reason. I will try to manually install it.

@MarioLiebisch
Copy link

@Backer-Sultan As far as I know it's only on MSDN so far, not yet on Windows Update (think that will follow some time within the next 2 or 3 weeks).

@chunliu
Copy link
Author

chunliu commented May 14, 2019

@thenecroscope after you deploy the solution, you should see Windows Terminal (Preview) in Start menu. You can launch the terminal from there.

@ksawerykarwacki
Copy link

@ksawerykarwacki I switched to building from VS after those warnings and everything builded and started. One misleading thing was lack of tabs which were hidden by default.

@mKay00
Copy link
Contributor

mKay00 commented May 14, 2019

Here on github under issues is the best place for feature requests, bugs, etc.
Keyboard shortcuts will be remappable soon and you can find and change them in the profiles.json #748

@miniksa miniksa added the Area-Build Issues pertaining to the build system, CI, infrastructure, meta label May 14, 2019
@miniksa miniksa changed the title Building the solution with VS2019 and v142 toolset Move the solution to VS2019 and v142 toolset May 14, 2019
@miniksa miniksa added this to the Windows Terminal v1.0 milestone May 14, 2019
iwhp added a commit to iwhp/terminal that referenced this issue May 17, 2019
@valen214
Copy link

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

I have to add /p:OutputPath=<project directory>\bin to mitigate some error.

@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label May 17, 2019
@miniksa miniksa added Issue-Task It's a feature request, but it doesn't really need a major design. Product-Conhost For issues in the Console codebase Product-Terminal The new Windows Terminal. and removed Mass-Chaos labels May 17, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label May 17, 2019
@miniksa miniksa self-assigned this May 24, 2019
@miniksa
Copy link
Member

miniksa commented May 24, 2019

Current issues delaying completion of this:

  • The internal build lab required for signing packages does not yet support Visual Studio 2019, 14.2, nor the 1903 SDK (10.0.18362).

    • Mail has been sent to the lab onboarding team asking for support and an ETA
  • The alternative of using a multi-phase build (use public Hosted 2019 pool for build, use internal pool for signing) is a possibility, but...

    • We would need to have something that sets up the versioning resources for us. This is currently done by an internal-only pool support task. We would need to identify and implement a public task to set up the version during the compilation phase on the Hosted 2019 pool and then send the artifacts to the internal 2017 pool for signing dispatch and symbol registration
  • A final alternative recommendation was given to us by the lab build team: try to nuget-fetch the build tools required onto the 2017 machine.

    • I tried this and it sat for 6+ minutes going nowhere and I presume it will time out. Reliability/performance of this is too bad for me to consider further.
  • I will upload a draft PR with the version number changes. It works fine in VS2019 with the version number changes. Also, as of my tests today thanks to the .vsconfig file, VS2019 can build it just fine (after resolving dependencies automatically/installing them). So can VS2017.

@miniksa
Copy link
Member

miniksa commented May 24, 2019

More stuff we're stuck on:

@fcrick
Copy link

fcrick commented Jun 26, 2019

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

@12101111 I hit this. Doing Clean Solution and building again made it go away.

@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label Jun 26, 2019
@miniksa miniksa added the Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. label Jun 26, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Build Issues pertaining to the build system, CI, infrastructure, meta Issue-Task It's a feature request, but it doesn't really need a major design. Product-Conhost For issues in the Console codebase Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.