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

Fix build errors in VS2019 and Build Tools v142 #449

Merged
merged 1 commit into from
May 7, 2019
Merged

Fix build errors in VS2019 and Build Tools v142 #449

merged 1 commit into from
May 7, 2019

Conversation

byteduck
Copy link
Contributor

@byteduck byteduck commented May 7, 2019

Without this, building in VS2019 results in multiple function is not a member of std errors. This fixes that. 😃

EDIT: Important to mention I'm using VS2019 16.0.3 and build tools v. 142.

Copy link

@philselmer philselmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified this fixes compilation errors using VS2019 16.0.3 with build tools v142.

Copy link

@wi-ry wi-ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved VS2019 build issue for me

@byteduck byteduck changed the title Fix build errors in VS2019 Fix build errors in VS2019 and Build Tools v142 May 7, 2019
@rw3iss
Copy link

rw3iss commented May 7, 2019

Got it to build in VS2019 after following this and also installed the WinRT C++ library, but debugging throws memory exception, oddly.
Please see #461
#461 (comment)

@vhanla
Copy link

vhanla commented May 7, 2019

@rw3iss Where do I get WinRT C++ Library?

I get error on TerminalCore:

error code "winrt/Microsoft.Terminal.Settings.h" not found in Terminal.cpp line 13

@rw3iss
Copy link

rw3iss commented May 7, 2019

@vhanla Read my comment?
https://marketplace.visualstudio.com/items?itemName=CppWinRTTeam.cppwinrt101804264

@xinkunZ xinkunZ mentioned this pull request May 7, 2019
@adjlyadv
Copy link

adjlyadv commented May 7, 2019

nice work

@mahmoudajawad
Copy link

mahmoudajawad commented May 7, 2019

Do I still need to download VS2017 build tools? I'm still getting this error after applying your patch:

The build tools for v142 (Platform Toolset = 'v142') cannot be found. To build using the v142 build tools, please install v142 build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".

@philselmer
Copy link

philselmer commented May 7, 2019

@AjawadMahmoud - I think you just need to change the build type from ARM64 to x64 or install the v142 build tools for ARM.

@zadjii-msft
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ankitbko
Copy link
Member

ankitbko commented May 7, 2019

I managed to build it is VS2019 without changing target to v142 and without any code change. Followed this to install WinRT and then right-clicked on solution -> install missing feature.

@Gnbrkm41
Copy link
Contributor

Gnbrkm41 commented May 7, 2019

Is this supposed to be done? on VS17 it seemed to work fine without the include. @ ankitbko seems to be suggesting it can be done without changes as well.

@zadjii-msft
Copy link
Member

zadjii-msft commented May 7, 2019

You shouldn't install the cppwinrt VSIX anymore, that's been deprecated in favor of the nuget package.

I was wrong about this, the VSIX does have some natvis defs in it, but it doesn't have the build rules anymore.

@zadjii-msft zadjii-msft merged commit 58ec472 into microsoft:master May 7, 2019
@mahmoudajawad
Copy link

@philselmer, hmm.. I tried many scenarios but was always ended up with some errors.
I'll spare some more time on this later.

@ankitbko
Copy link
Member

You shouldn't install the cppwinrt VSIX anymore, that's been deprecated in favor of the nuget package.

Is this really deprecated? It is still present in official docs of WinRT. Nuget Package description mentions that MSBuild support is removed from vsix but I am not sure if there are other dependencies required by the project that is included in this visx.

@zadjii-msft
Copy link
Member

Ahhh okay I see what they've done. I'm dealing with outdated information from the last time we met with them. I see now that the VSIX does have some natvis stuff to make debugging easier. When we were last working with them, we were helping get the build rules into nuget, but I didn't realize they kept the vsix. That's my bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.