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

Created on 7 May 2019  路  10Comments  路  Source: microsoft/terminal

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.

Area-Build Help Wanted Issue-Question Product-Terminal Resolution-Answered

Most helpful comment

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

All 10 comments

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

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

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.

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

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.

image

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

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

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

That's #438

This appears to have sorted itself out. Closing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mdtauk picture mdtauk  路  3Comments

wkbrd picture wkbrd  路  3Comments

DieselMeister picture DieselMeister  路  3Comments

miniksa picture miniksa  路  3Comments

ghost picture ghost  路  3Comments