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

Closed
opened 2026-01-30 22:02:58 +00:00 by claunia · 10 comments
Owner

Originally created by @CrispyBacon1999 on GitHub (May 7, 2019).

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.

Originally created by @CrispyBacon1999 on GitHub (May 7, 2019). 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.
Author
Owner

@EnterpriseBCMe commented on GitHub (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 commented on GitHub (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
Author
Owner

@zadjii-msft commented on GitHub (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 :)

@zadjii-msft commented on GitHub (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 :)**
Author
Owner

@ankitbko commented on GitHub (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.

@ankitbko commented on GitHub (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.
Author
Owner

@ThreeSevenths commented on GitHub (May 7, 2019):

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

@ThreeSevenths commented on GitHub (May 7, 2019): If you right click on TerminalApp's references and add a reference to TerminalSettings this will likely fix your problem.
Author
Owner

@RefundGarbage commented on GitHub (May 9, 2019):

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.

@RefundGarbage commented on GitHub (May 9, 2019): I'm here now. I have the same problem with the code. Reference does not really work: ![image](https://user-images.githubusercontent.com/29007539/57462557-ea35cd00-722d-11e9-9884-2fc1488e574a.png) So, how to manually build TerminalSettings first, it just seems TerminalSettings.h is missing, that's all to this problem.
Author
Owner

@zadjii-msft commented on GitHub (May 9, 2019):

image

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

@zadjii-msft commented on GitHub (May 9, 2019): ![image](https://user-images.githubusercontent.com/18356694/57462800-27ef2180-723f-11e9-80a9-6ac8f6200afa.png) `TerminalSettings.h` is an auto-generated file, so the TerminalSettings project need to build to create it.
Author
Owner

@zadjii-msft commented on GitHub (May 9, 2019):

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

@zadjii-msft commented on GitHub (May 9, 2019): 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`
Author
Owner

@RefundGarbage commented on GitHub (May 9, 2019):

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

@RefundGarbage commented on GitHub (May 9, 2019): Not the same error, I read the output once again, it failed because `Command "` ![image](https://user-images.githubusercontent.com/29007539/57463709-25390000-7230-11e9-97ce-b8d4b38bf4cf.png)
Author
Owner

@zadjii-msft commented on GitHub (May 9, 2019):

That's #438

@zadjii-msft commented on GitHub (May 9, 2019): That's #438
Author
Owner

@miniksa commented on GitHub (May 18, 2019):

This appears to have sorted itself out. Closing.

@miniksa commented on GitHub (May 18, 2019): This appears to have sorted itself out. Closing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#767