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

Cannot open include file: 'winrt/Microsoft.Terminal.Settings.h'. Build failed. #520

Closed
CrispyBacon1999 opened this issue May 7, 2019 · 10 comments
Labels
Area-Build Issues pertaining to the build system, CI, infrastructure, meta Help Wanted We encourage anyone to jump in on these. Issue-Question For questions or discussion Product-Terminal The new Windows Terminal. Resolution-Answered Related to questions that have been answered

Comments

@CrispyBacon1999
Copy link

When trying to build, I get

C1083 Cannot open include file: 'winrt/Microsoft.Terminal.Settings.h': No such file or directory
This is coming from the TerminalCore project in Terminal.cpp, line 13.

@EnterpriseBCMe
Copy link

EnterpriseBCMe commented May 7, 2019

got right the same problem with you dude. I have tried

U need to install the binary of winrt which can be found here:
https://marketplace.visualstudio.com/items?itemName=CppWinRTTeam.cppwinrt101804264

I've tried which was mentioned in other issues but it doesn't work at all and I still can't find that header in my pc

@zadjii-msft
Copy link
Member

zadjii-msft commented May 7, 2019

Please don't install the C++/WinRT VSIX. They're deprecating that in favor of the nuget package, which the solution should install for you.

There are some mysterious issues with build order and that project, and there always have been.

If you manually build that project (TerminalSettings) first, then the rest of the solution will build fine.

If someone could figure out how to consistently get the TerminalSettings project to build first, a PR would be welcome :)

@ankitbko
Copy link
Member

ankitbko commented May 7, 2019

got right the same problem with you dude. I have tried

U need to install the binary of winrt which can be found here:
https://marketplace.visualstudio.com/items?itemName=CppWinRTTeam.cppwinrt101804264

I've tried which was mentioned in other issues but it doesn't work at all and I still can't find that header in my pc

@EnterpriseBCMe Right click on solution and check if there is option to "Install Missing Features". It solved the problem for me.

@ThreeSevenths
Copy link

If you right click on TerminalApp's references and add a reference to TerminalSettings this will likely fix your problem.

@zadjii-msft zadjii-msft added the Help Wanted We encourage anyone to jump in on these. label May 8, 2019
@zadjii-msft zadjii-msft added the Area-Build Issues pertaining to the build system, CI, infrastructure, meta label May 9, 2019
@RefundGarbage
Copy link

I'm here now. I have the same problem with the code.
Reference does not really work:
image
So, how to manually build TerminalSettings first, it just seems TerminalSettings.h is missing, that's all to this problem.

@zadjii-msft
Copy link
Member

image

TerminalSettings.h is an auto-generated file, so the TerminalSettings project need to build to create it.

@zadjii-msft
Copy link
Member

Did you restore nuget packages, making sure that the CppWinrt package is installed? It'll be under packages\Microsoft.Windows.CppWinRT.2.0.190417.3

@RefundGarbage
Copy link

Not the same error, I read the output once again, it failed because Command "
image

@zadjii-msft
Copy link
Member

That's #438

@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label May 17, 2019
@miniksa miniksa added Product-Terminal The new Windows Terminal. Resolution-Answered Related to questions that have been answered and removed Mass-Chaos labels May 17, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label May 18, 2019
@miniksa
Copy link
Member

miniksa commented May 18, 2019

This appears to have sorted itself out. Closing.

@miniksa miniksa closed this as completed May 18, 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 Help Wanted We encourage anyone to jump in on these. Issue-Question For questions or discussion Product-Terminal The new Windows Terminal. Resolution-Answered Related to questions that have been answered
Projects
None yet
Development

No branches or pull requests

7 participants