how to register WindowsApp runtime classes?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Reproduce the minimal C++ program shown in the issue after installing Windows App SDK 1.3 from the linked installer, and confirm where 80040154 occurs. Start by checking the runtime-class deployment and registration requirements for this installation method. Done means documenting the supported registration or deployment steps, or clarifying that the installer is not sufficient for this scenario.
Written by the indexing model from the issue text.
Description
I have following code, it's the short version of the sample squares, it compiled, but failed with 80040154(REGDB_E_CLASSNOTREG) which means the runtime classes of WindowsApp is not registered. I've installed WindowsAppSDK 1.3 from this link. It seems that the installer did not register it. So, my question is how to register it manually?
#include <winrt/base.h>
#include <winrt/Microsoft.UI.Windowing.h>
#include <winrt/Microsoft.UI.Dispatching.h>
#include <windows.h>
#pragma comment(lib, "windowsapp")
using namespace winrt;
using namespace Microsoft::UI::Windowing;
using namespace Microsoft::UI::Dispatching;
/*
cl /nologo /EHsc /Zi /std:c++latest /Iapiexp/winui3 winui3.cpp /link /subsystem:console /debug
*/
int WinMain(HINSTANCE,HINSTANCE,PSTR,int) {
winrt::init_apartment(winrt::apartment_type::single_threaded);
try {
auto appWindow = AppWindow::Create();
appWindow.Title(L"Squares");
appWindow.Show();
auto ctl = DispatcherQueueController::CreateOnCurrentThread();
auto queue = ctl.DispatcherQueue();
queue.RunEventLoop();
} catch(hresult_error e) {
printf("winui3 0x%x\n",int32_t(e.code()));
}
}
int main() {
return WinMain(nullptr,nullptr,nullptr,0);
}
- Dominant language
- PowerShell
- Stars
- 1k
- Forks
- 335
- Avg merge
- 7h 13m
- Merged PRs (30d)
- 3
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/WindowsAppSDK-Samples
-
"Samples\Content\cpp-win32\Squares\Squares.vcxproj" doesn't configure precompiled headers correctlyOpen
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
[WinML] Dependency resolution issues w/ Python sampleMay be free again @adrastogi claimed this 233 days ago, and no pull request is open. Open
microsoft/WindowsAppSDK-Samples#595 · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 28/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
microsoft/WindowsAppSDK-Samples#580 · 1 comment ·
All issues in microsoft/WindowsAppSDK-Samples
Similar issues
-
area: desktop area: website priority: P2 type: feature
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
appandflow/stim#3411 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
randheimer/PDF-Fusion#13 ·
Maintainers usually reply within 1 day
-
优化导入 OCR 模型选择文件的按钮样式Open
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
siyuan-note/siyuan#20430 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug]: Desktop shows no version when updates are turned off by provisioningPossibly taken @samuelsl27 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Stirling-Tools/Stirling-PDF#8436 · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
vinnytherobot/MacOSDock#20 · 3 comments ·