Windows build number: 10.0.18362.116
Windows Terminal version (if applicable): 8dab297bd196a04b8bc7015f7969a0dc2a5c4556 or higher
VS 2019, SDK 10.0.18362.0, toolset v142
Just try to build the project.
The project is correctly built.
Compilation error because of await keyword in App.cpp file.
You're going to have to be more specific than this. What's the _exact_ error you're seeing?
Error list:
build_errors.txt
Okay so some people are definitely reporting the same error as you.
The relevant text is here:
Error C2561 'winrt::TerminalApp::implementation::App::_ShowOkDialog': function must return a value TerminalApp ...\terminal\src\cascadia\TerminalApp\App.cpp 196
Error C2065 'await': undeclared identifier TerminalApp ...\terminal\src\cascadia\TerminalApp\App.cpp 214
Error C2146 syntax error: missing ';' before identifier 'dialog' TerminalApp ...\terminal\src\cascadia\TerminalApp\App.cpp 214
Error C2065 'LaunchSettings': undeclared identifier TerminalApp ...\terminal\src\cascadia\TerminalApp\App.cpp 388
Error C2065 'LaunchSettings': undeclared identifier TerminalApp ...\work\terminal\src\cascadia\TerminalApp\App.cpp 815
For some reason, the await keyword is not working for some people. I believe there was a change to how C++winrt included await with 2.0. It's possible a nuget restore might fix this, or a clean rebuild of the TerminalApp project
I have tried both a nuget restore and a clean solution but in both cases I still get the same errors in the app.cpp.
Error C2065 'await': undeclared identifier TerminalApp C:UsersnmoultonSourceReposTerminalsrccascadiaTerminalAppApp.cpp 214
Error C2146 syntax error: missing ';' before identifier 'dialog' TerminalApp C:UsersnmoultonSourceReposTerminalsrccascadiaTerminalAppApp.cpp 214
Error C2561 'winrt::TerminalApp::implementation::App::_ShowOkDialog': function must return a value TerminalApp C:UsersnmoultonSourceReposTerminalsrccascadiaTerminalAppApp.cpp 196
Message see declaration of 'winrt::TerminalApp::implementation::App::_ShowOkDialog' TerminalApp C:UsersnmoultonSourceReposTerminalsrccascadiaTerminalAppApp.cpp 187
Warning C4834 discarding return value of function with 'nodiscard' attribute TerminalApp C:UsersnmoultonSourceReposTerminalsrccascadiaTerminalAppApp.cpp 372
Error C2065 'LaunchSettings': undeclared identifier TerminalApp C:UsersnmoultonSourceReposTerminalsrccascadiaTerminalAppApp.cpp 388
Warning C4834 discarding return value of function with 'nodiscard' attribute TerminalApp C:UsersnmoultonSourceReposTerminalsrccascadiaTerminalAppApp.cpp 710
Error C2065 'LaunchSettings': undeclared identifier TerminalApp C:UsersnmoultonSourceReposTerminalsrccascadiaTerminalAppApp.cpp 815
Warning C4267 '=': conversion from 'size_t' to 'int', possible loss of data TerminalApp C:UsersnmoultonSourceReposTerminalsrccascadiaTerminalAppApp.cpp 1018
Can confirm that neither clean build or nuget restore fixes this. Errors stay the same.
I'm not sure of the implications of this, but replacing "await" with "co_await" fixes the build, and the dialog still appears to work.
Woah what the frick. I'm really curious why that compiles at all with just await. That should certainly be co_await
Most helpful comment
Woah what the frick. I'm really curious why that compiles at all with just
await. That should certainly beco_await