Open dr-eck opened 2 months ago
I just went through the project settings and found that the C++ Language Standard was set to an older version. When I updated to Preview, the program started working. Issue solved.
Hi,
I just retried the project as is and it worked fine (I'm also on VS 2022 17.11.2). C++ language standard is set to "ISO C++17 Standard (/std:c++17)".
However your error "winrt::hresult_class_not_registered" looks much like something else (WinRT class activation that failed).
Strange, not sure what's the root cause of your problem. I've just updated the nuget packages too though...
Simon, Thanks for providing this sample. I'm hoping to implement a TreeView, so it's exactly what I need. Unfortunately, I'm getting an error: ''' Unhandled exception at 0x00007FFA0562FABC in TreeViewSample.exe: Microsoft C++ exception: winrt::hresult_class_not_registered at memory location 0x0000000880AFEE68. ''' All I did was clone your code, compile it in Debug mode (VS 2022 17.11.2), and run. Here's the call stack:
''' KernelBase.dll!00007ffa0562fabc() Unknown vcruntime140d.dll!00007ff930c29362() Unknown