Unable to build freshly cloned project #14102

Closed
opened 2026-01-31 04:00:55 +00:00 by claunia · 11 comments
Owner

Originally created by @marcelwgn on GitHub (Jun 3, 2021).

After cloning the repo and initializing the git-submodules, I am unable to build the project. This both happens with Visual Studio and using the Powershell instructions. I was trying to run the Cascadia Package from the OpenConsole.sln solution in the Debug x64 configuration.

Attached is the log from building the project in Visual Studio: buildlog.txt

Originally created by @marcelwgn on GitHub (Jun 3, 2021). After cloning the repo and initializing the git-submodules, I am unable to build the project. This both happens with Visual Studio and using the Powershell instructions. I was trying to run the Cascadia Package from the OpenConsole.sln solution in the Debug x64 configuration. Attached is the log from building the project in Visual Studio: [buildlog.txt](https://github.com/microsoft/terminal/files/6593792/buildlog.txt)
claunia added the Needs-TriageResolution-Fix-CommittedNeeds-Tag-Fix labels 2026-01-31 04:00:55 +00:00
Author
Owner

@DHowett commented on GitHub (Jun 3, 2021):

Huh, this looks like an issue that was fixed in the 10.0.19041 SDK. Have you cleaned out obj/ and all the Generated Files directories? They may not be automatically cleaned up during Clean, unfortunately.

@DHowett commented on GitHub (Jun 3, 2021): Huh, this looks like an issue that was fixed in the 10.0.19041 SDK. Have you cleaned out obj/ and all the Generated Files directories? They may not be automatically cleaned up during Clean, unfortunately.
Author
Owner

@marcelwgn commented on GitHub (Jun 3, 2021):

That didn't seem to really work, I tried git clean -d -f -x to clean everything up and rebuild but got the same error again. Also recloning the project and building doesn't seem to work. Is there a workaround I could use even if it means modifying some code?

@marcelwgn commented on GitHub (Jun 3, 2021): That didn't seem to really work, I tried `git clean -d -f -x` to clean everything up and rebuild but got the same error again. Also recloning the project and building doesn't seem to work. Is there a workaround I could use even if it means modifying some code?
Author
Owner

@DHowett commented on GitHub (Jun 3, 2021):

Oh right, you said it was a fresh clone. VERY unusual.

For now, you can revert e3281ce354. 😄

@DHowett commented on GitHub (Jun 3, 2021): Oh right, you said it was a fresh clone. VERY unusual. For now, you can revert https://github.com/microsoft/terminal/commit/e3281ce3548e81f7b170aa7160b3e7fd119aa80e. :smile:
Author
Owner

@PankajBhojwani commented on GitHub (Jun 3, 2021):

I'm having the same issue after merging main, these sections from the build log seem relevant:

33>D:\Projects\terminal\src\cascadia\TerminalSettingsModel\ActionMap.cpp(652): error C2259: 'winrt::Microsoft::Terminal::Settings::Model::implementation::ActionAndArgs': cannot instantiate abstract class
33>D:\Projects\terminal\src\cascadia\TerminalSettingsModel\ActionAndArgs.h(13): message : see declaration of 'winrt::Microsoft::Terminal::Settings::Model::implementation::ActionAndArgs'
33>D:\Projects\terminal\src\cascadia\TerminalSettingsModel\ActionMap.cpp(652): message : due to following members:
33>D:\Projects\terminal\src\cascadia\TerminalSettingsModel\ActionMap.cpp(652): message : 'void winrt::impl::root_implements<D,winrt::Microsoft::Terminal::Settings::Model::ActionAndArgs>::use_make_function_to_create_this_object(void)': is abstract
33>        with
33>        [
33>            D=winrt::Microsoft::Terminal::Settings::Model::implementation::ActionAndArgs
33>        ]
33>D:\Projects\terminal\src\cascadia\TerminalSettingsModel\Generated Files\winrt\base.h(7232): message : see declaration of 'winrt::impl::root_implements<D,winrt::Microsoft::Terminal::Settings::Model::ActionAndArgs>::use_make_function_to_create_this_object'
33>        with
33>        [
33>            D=winrt::Microsoft::Terminal::Settings::Model::implementation::ActionAndArgs
33>        ]
35>D:\Projects\terminal\src\cascadia\TerminalSettingsEditor\MainPage.h(46,41): error C2259: 'winrt::Microsoft::Terminal::Settings::Editor::implementation::ColorSchemesPageNavigationState': cannot instantiate abstract class (compiling source file Generated Files\XamlTypeInfo.g.cpp)
35>D:\Projects\terminal\src\cascadia\TerminalSettingsEditor\ColorSchemes.h(13): message : see declaration of 'winrt::Microsoft::Terminal::Settings::Editor::implementation::ColorSchemesPageNavigationState' (compiling source file Generated Files\XamlTypeInfo.g.cpp)
35>D:\Projects\terminal\src\cascadia\TerminalSettingsEditor\MainPage.h(46,41): message : due to following members: (compiling source file Generated Files\XamlTypeInfo.g.cpp)
35>D:\Projects\terminal\src\cascadia\TerminalSettingsEditor\MainPage.h(46,41): message : 'void winrt::impl::root_implements<D,winrt::Microsoft::Terminal::Settings::Editor::ColorSchemesPageNavigationState>::use_make_function_to_create_this_object(void)': is abstract
35>        with
35>        [
35>            D=winrt::Microsoft::Terminal::Settings::Editor::implementation::ColorSchemesPageNavigationState
35>        ] (compiling source file Generated Files\XamlTypeInfo.g.cpp)
35>D:\Projects\terminal\src\cascadia\TerminalSettingsEditor\Generated Files\winrt\base.h(7232): message : see declaration of 'winrt::impl::root_implements<D,winrt::Microsoft::Terminal::Settings::Editor::ColorSchemesPageNavigationState>::use_make_function_to_create_this_object'
35>        with
35>        [
35>            D=winrt::Microsoft::Terminal::Settings::Editor::implementation::ColorSchemesPageNavigationState
35>        ] (compiling source file Generated Files\XamlTypeInfo.g.cpp)
36>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\xmemory(1895,9): error C2259: 'winrt::TerminalApp::implementation::XamlMetaDataProvider': cannot instantiate abstract class (compiling source file App.cpp)
36>D:\Projects\terminal\src\cascadia\TerminalApp\Generated Files\XamlMetaDataProvider.h(36): message : see declaration of 'winrt::TerminalApp::implementation::XamlMetaDataProvider' (compiling source file App.cpp)
36>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\xmemory(1895,9): message : due to following members: (compiling source file App.cpp)
36>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\xmemory(1895,9): message : 'void winrt::impl::root_implements<D,winrt::TerminalApp::XamlMetaDataProvider>::use_make_function_to_create_this_object(void)': is abstract
36>        with
36>        [
36>            D=winrt::TerminalApp::implementation::XamlMetaDataProvider
36>        ] (compiling source file App.cpp)
36>D:\Projects\terminal\src\cascadia\TerminalApp\Generated Files\winrt\base.h(7232): message : see declaration of 'winrt::impl::root_implements<D,winrt::TerminalApp::XamlMetaDataProvider>::use_make_function_to_create_this_object'
36>        with
36>        [
36>            D=winrt::TerminalApp::implementation::XamlMetaDataProvider
36>        ] (compiling source file App.cpp)
@PankajBhojwani commented on GitHub (Jun 3, 2021): I'm having the same issue after merging main, these sections from the build log seem relevant: ``` 33>D:\Projects\terminal\src\cascadia\TerminalSettingsModel\ActionMap.cpp(652): error C2259: 'winrt::Microsoft::Terminal::Settings::Model::implementation::ActionAndArgs': cannot instantiate abstract class 33>D:\Projects\terminal\src\cascadia\TerminalSettingsModel\ActionAndArgs.h(13): message : see declaration of 'winrt::Microsoft::Terminal::Settings::Model::implementation::ActionAndArgs' 33>D:\Projects\terminal\src\cascadia\TerminalSettingsModel\ActionMap.cpp(652): message : due to following members: 33>D:\Projects\terminal\src\cascadia\TerminalSettingsModel\ActionMap.cpp(652): message : 'void winrt::impl::root_implements<D,winrt::Microsoft::Terminal::Settings::Model::ActionAndArgs>::use_make_function_to_create_this_object(void)': is abstract 33> with 33> [ 33> D=winrt::Microsoft::Terminal::Settings::Model::implementation::ActionAndArgs 33> ] 33>D:\Projects\terminal\src\cascadia\TerminalSettingsModel\Generated Files\winrt\base.h(7232): message : see declaration of 'winrt::impl::root_implements<D,winrt::Microsoft::Terminal::Settings::Model::ActionAndArgs>::use_make_function_to_create_this_object' 33> with 33> [ 33> D=winrt::Microsoft::Terminal::Settings::Model::implementation::ActionAndArgs 33> ] ``` ``` 35>D:\Projects\terminal\src\cascadia\TerminalSettingsEditor\MainPage.h(46,41): error C2259: 'winrt::Microsoft::Terminal::Settings::Editor::implementation::ColorSchemesPageNavigationState': cannot instantiate abstract class (compiling source file Generated Files\XamlTypeInfo.g.cpp) 35>D:\Projects\terminal\src\cascadia\TerminalSettingsEditor\ColorSchemes.h(13): message : see declaration of 'winrt::Microsoft::Terminal::Settings::Editor::implementation::ColorSchemesPageNavigationState' (compiling source file Generated Files\XamlTypeInfo.g.cpp) 35>D:\Projects\terminal\src\cascadia\TerminalSettingsEditor\MainPage.h(46,41): message : due to following members: (compiling source file Generated Files\XamlTypeInfo.g.cpp) 35>D:\Projects\terminal\src\cascadia\TerminalSettingsEditor\MainPage.h(46,41): message : 'void winrt::impl::root_implements<D,winrt::Microsoft::Terminal::Settings::Editor::ColorSchemesPageNavigationState>::use_make_function_to_create_this_object(void)': is abstract 35> with 35> [ 35> D=winrt::Microsoft::Terminal::Settings::Editor::implementation::ColorSchemesPageNavigationState 35> ] (compiling source file Generated Files\XamlTypeInfo.g.cpp) 35>D:\Projects\terminal\src\cascadia\TerminalSettingsEditor\Generated Files\winrt\base.h(7232): message : see declaration of 'winrt::impl::root_implements<D,winrt::Microsoft::Terminal::Settings::Editor::ColorSchemesPageNavigationState>::use_make_function_to_create_this_object' 35> with 35> [ 35> D=winrt::Microsoft::Terminal::Settings::Editor::implementation::ColorSchemesPageNavigationState 35> ] (compiling source file Generated Files\XamlTypeInfo.g.cpp) ``` ``` 36>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\xmemory(1895,9): error C2259: 'winrt::TerminalApp::implementation::XamlMetaDataProvider': cannot instantiate abstract class (compiling source file App.cpp) 36>D:\Projects\terminal\src\cascadia\TerminalApp\Generated Files\XamlMetaDataProvider.h(36): message : see declaration of 'winrt::TerminalApp::implementation::XamlMetaDataProvider' (compiling source file App.cpp) 36>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\xmemory(1895,9): message : due to following members: (compiling source file App.cpp) 36>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include\xmemory(1895,9): message : 'void winrt::impl::root_implements<D,winrt::TerminalApp::XamlMetaDataProvider>::use_make_function_to_create_this_object(void)': is abstract 36> with 36> [ 36> D=winrt::TerminalApp::implementation::XamlMetaDataProvider 36> ] (compiling source file App.cpp) 36>D:\Projects\terminal\src\cascadia\TerminalApp\Generated Files\winrt\base.h(7232): message : see declaration of 'winrt::impl::root_implements<D,winrt::TerminalApp::XamlMetaDataProvider>::use_make_function_to_create_this_object' 36> with 36> [ 36> D=winrt::TerminalApp::implementation::XamlMetaDataProvider 36> ] (compiling source file App.cpp) ```
Author
Owner

@DHowett commented on GitHub (Jun 3, 2021):

Whoa, wait. The MainPage and ActionMap ones are completely correct: they should not be using stack allocation for winrt objects. They need to use make.

@DHowett commented on GitHub (Jun 3, 2021): Whoa, wait. The MainPage and ActionMap ones are completely correct: they should not be using stack allocation for winrt objects. They need to use `make`.
Author
Owner

@marcelwgn commented on GitHub (Jun 3, 2021):

@DHowett Do you want to create a PR for this or mind if I do this (though might be tomorrow).

@marcelwgn commented on GitHub (Jun 3, 2021): @DHowett Do you want to create a PR for this or mind if I do this (though might be tomorrow).
Author
Owner

@DHowett commented on GitHub (Jun 3, 2021):

I'm stuck in meetings all day today and tomorrow; feel free 😄

Pankaj can also jump in if he wants to.

In short:

  1. We should use make<>, not stack allocation (need a PR to fix this in the code! How did this pass through in my PR build?)
  2. I thought the 19041 SDK fixed the XAML code generator bug! If the 19041 SDK does not actually fix the xaml compiler, we need to revert globally -- however, it ALSO passed in PR...
@DHowett commented on GitHub (Jun 3, 2021): I'm stuck in meetings all day today and tomorrow; feel free :smile: Pankaj can also jump in if he wants to. In short: 1. We should use make<>, not stack allocation (need a PR to fix this in the code! How did this pass through in my PR build?) 2. I thought the 19041 SDK fixed the XAML code generator bug! If the 19041 SDK _does not actually fix the xaml compiler_, we need to revert globally -- however, it ALSO passed in PR...
Author
Owner

@marcelwgn commented on GitHub (Jun 3, 2021):

Haha, alright, @PankajBhojwani do you want to create a PR for this? Otherwise I would take this.

Bit surprised too that this passed through in your PR build. Regarding XAML, it could be that this is an issue because of the failed dependendency projects?

@marcelwgn commented on GitHub (Jun 3, 2021): Haha, alright, @PankajBhojwani do you want to create a PR for this? Otherwise I would take this. Bit surprised too that this passed through in your PR build. Regarding XAML, it could be that this is an issue because of the failed dependendency projects?
Author
Owner

@DHowett commented on GitHub (Jun 3, 2021):

Possibly. Hmm.

Alternatively, something may be getting generated with the old 18362 XAML compiler. Mind grabbing a binlog? msbuild /bl [args args args]

@DHowett commented on GitHub (Jun 3, 2021): _Possibly._ Hmm. Alternatively, something may be getting generated with the old 18362 XAML compiler. Mind grabbing a binlog? `msbuild /bl [args args args]`
Author
Owner

@marcelwgn commented on GitHub (Jun 3, 2021):

I can try this, however I'm not experienced with getting the binlog, especially when building through VS.

@marcelwgn commented on GitHub (Jun 3, 2021): I can try this, however I'm not experienced with getting the binlog, especially when building through VS.
Author
Owner

@PankajBhojwani commented on GitHub (Jun 3, 2021):

Haha, alright, @PankajBhojwani do you want to create a PR for this? Otherwise I would take this.

Please feel free!

@PankajBhojwani commented on GitHub (Jun 3, 2021): > Haha, alright, @PankajBhojwani do you want to create a PR for this? Otherwise I would take this. Please feel free!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14102