# Unable to load plug-in: initialization failed

**URL:** <https://discourse.mcneel.com/t/unable-to-load-plug-in-initialization-failed/147706>\
**Category:** Rhino Developer\
**Tags:** windows, plugin, rhino7, cplusplus\
**Created:** [September 13, 2022, 6:59am UTC](https://discourse.mcneel.com/t/unable-to-load-plug-in-initialization-failed/147706 "2022-09-13T06:59:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Håvard](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/h%C3%A5vard/32/566425_2.png) [@Håvard](https://discourse.mcneel.com/u/H%C3%A5vard)\
**Post date:** [September 13, 2022, 6:59am UTC](https://discourse.mcneel.com/t/unable-to-load-plug-in-initialization-failed/147706/1 "2022-09-13T06:59:50Z")

</div>

Hi.

I have an older plug-in project which I have been appointed to update for Rhino 7. It was originally built for Rhino 5.  
After launching Rhino, I go to Tools → Options… → Plug-ins → Install… , select my freshly compiled .rhp file and am met with:  
“Unable to load .rhp plug-in: initialization failed.”  
The Details button will not show anything useful, not even the developer declarations.

For comparison, I made a fresh new project of type “Rhinoceros 6 Plug-in”. Installed the same way. Runs smoothly in Rhino 7.  
In this test project, if I return FALSE in OnLoadPlugIn(), I’m met with a slightly different message saying:  
“Unable to load .rhp plug-in: application initialization failed.”  
And the developer declarations are visible after clicking the Details button.

Would you have any clue how to debug this?

Much appreciated.

OS: Microsoft Windows 10 Pro 10.0.19044  
IDE: Microsoft Visual Studio Professional 2017 15.9.36  
Rhino SDK: 6.26.20147.06511  
Rhino 3D: 7.21.22208.13001, 2022-07-27

---

<div class="post-metadata">

**Author:** ![menno](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/menno/32/770384_2.png) [@menno](https://discourse.mcneel.com/u/menno)\
**Post date:** [September 13, 2022, 7:57am UTC](https://discourse.mcneel.com/t/unable-to-load-plug-in-initialization-failed/147706/2 "2022-09-13T07:57:17Z")

</div>

Use the [CFF explorer](https://ntcore.com/?page_id=388) to find out the dependencies. Maybe there is a dependency missing, for example a Visual C++ runtime libary.

---

<div class="post-metadata">

**Author:** ![dale](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/dale/32/685184_2.png) [@dale](https://discourse.mcneel.com/u/dale)\
**Post date:** [September 13, 2022, 3:43pm UTC](https://discourse.mcneel.com/t/unable-to-load-plug-in-initialization-failed/147706/3 "2022-09-13T15:43:46Z")

</div>

Hi @Håvard,

When migrating a Rhino 5 C++ plug-in project to Rhino 6, make sure to follow all of the steps.

> **[Migrate your plugin project to Rhino 6 manually](https://developer.rhino3d.com/guides/cpp/migrate-your-plugin-manual-windows/)**
>
> This guide walks you through manually migrating your Rhino 5 plugin project to Rhino 6.

It’s often easier to just start a new project and move all of your old code over.

– Dale
