C# Unable to load DLL - HRESULT: 0x8007007E occurs for application with Japanese culture

82 Views Asked by At

I have a c# application which imports unmanaged dll(which is also built by me) and uses it. Recently migrated the application from VS2017 to VS2022. Now the application crashes whenever it could not find the redistributable. Previously, application will just show warning alone but now it is crashing.

Strange, but this happens only in systems with ja-JP culture.

I manually installed VS2022 redistributable and the crash no longer happens. That too by mistake I first installed x86. still no use. only it accepts x64.

Any special setup for Japanese culture?. why particular in that culture alone?

1

There are 1 best solutions below

3
Node defender On

I think this has little to do with Japanese culture. But just to be sure, you can use Visual Studio Installer to reinstall the Japanese language pack in Language packs.

enter image description here

Key points:

According to your description, you were able to solve this issue after installing VS2022 redistributable. This shows that the system with Japanese culture lacks the runtime component for running C++.

Because Visual C++ Redistributable is used for applications that need to run C++ developed using Visual Studio and dynamically linked to libraries. You can use these to run such applications on a system that does not currently have Visual Studio installed. It will install these runtime components: C Runtime (CRT), Standard C++, MFC, C++ AMP, OpenMP.

Visual C++ is not only a C++ compiler, but also a visual integrated development environment (IDE) based on the Windows operating system; Visual C++ is composed of many components, including the editor, debugger, program wizard AppWizard, and class wizard Class Wizard and other development tools, these components are integrated into a harmonious development environment through a component called Developer Studio; this running component contains the relevant component content of VC++ 2015-2022. If the old version has been installed, the relevant files will be overwritten.