Skip to content

[react-native-windows] REGDB_E_CLASSNOTREG error in RoGetActivationFactory #635

@taenri

Description

@taenri

On Windows 11, react-native-windows version 0.68.2 we get a runtime error when trying to use the DateTimePicker after following the manual setup instructions outlined in the repo.

The error occurs when we try to create a new instance of winrt::DateTimePicker::ReactPackageProvider in our App class. The error code is REGDB_E_CLASSNOTREG error, which happens after calling RoGetActivationFactory for the winrt class name DateTimePicker.ReactPackageProvider.

This happens because the winrt class namespace does not match the DLL name. Either the winrt namespace needs to be renamed to DateTimePickerWindows, or the DateTimePickerWindows project/dll needs to be renamed to just DateTimePicker. I have tested this with local modifications to the vcxproj, and after these changes the date time picker works as expected.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions