Creating a new rhino4.0 plug-in,use vs2005

When I use vs2005 created a new plug-in project,Compile and build solutions are no problem,But when I debug, an error occurs:Unable to start C:\Program Files (x86)\Rhinoceros 4.0\System\Rhino4_d.exe;Because the application is configured incorrectly, the program fails to start,Please find a list of files for possible errors,Reinstalling the application may fix this problem.I had to reinstall the application many times, but always has this wrong,I hope someone can help me
best wishes!

I’m assuming you are new to writing plugins with Visual Studio.If you’ve successfully debugged other Rhino plugins before, I don’t think you’ve given enough detail about what’s going on.

If my assumption is correct, then perhaps you haven’t fully understood what’s going on when trying to debug a plugin: The plugin is compiled into a .DLL file, which is essentially a run-time library with a different Rhino-specific file extension. In order to actually test your code, you need to call it from some program. That would be Rhino - the version you’ve written your code for. Visual Studio has provisions for starting a test program to run .DLL code for debugging. To get Visual Studio to load Rhino you need to tell VS in your project configuration to start it in order to call your plugin code for debugging. After you’ve done that and Rhino starts when you hit F5 in VS, you need to load your debug .rhp using Rhino’s plugin manager the first time you try to debug. After that Rhino will know about your test code and will start debugging automatically when you hit F5. It will still be a two-step process however: first Rhino loads, then you need to run your plugin command from within Rhino (probably via command line at first) each time you start a new debug session.

I know this is pretty sketchy, but I’m not at my VS/Rhino computer right now so I can’t give you authoritative detailed examples. If you can’t get it sorted out with this general info and what’s available on the McNeel developer’s wiki let us know.

And as I said, if my assumption is wrong and you’ve successfully debugged other Rhino plugins and this is strangely different, then let us know more details of what’s been successful and what’s different about this one.

I would recommend using the pseudo-debug mode instead of debug. Pseudo debug will use the standard release Rhino for debugging which is typically a better way to test your code.

yes,you are right,I’m new to writing plugins with Visual Studio,thanks for your details about the debug,when I used the pseudo-debug mode instead of debug,it succeeded.

thank you so much, when I use the pseudo-debug mode instead of debug, It generated XXX_pd.rhp file, then I can load it successfully in rhino.

Hi Jenny,

Regarding the running of Debug Rhino, please review the following information:

http://wiki.mcneel.com/developer/rundebugrhino

Does this help?

– Dale

Hi Dale,
Thank you for your suggestions, but even I have the commercial version of Rhino, Rhino 4.0 SR9, Rhino 4.0 SR9 C++ SDK, and also using Windows Updates to ensure my system is “up-to-date”, still have the error:

Unable to start program 'C:\Program Files\Rhinoceros 4.0\System\Rhino4_d.exe

Do you have other solutions?

Thank you again!

Hi dale and Jenny

I have same pop like this

"Unable to start program ‘C:…path…rhp’

Do u have solution?

Thank you!

Hi Dong-Ying,

We will need more information in order to be helpful.

Are you trying to debug your plug-in? Did you using the PseudoDebug build configuration? What version and service release of Rhino 4.0 do you have?

– Dale

Hi Dale good morning,

I am using Win7, VS10, Rhino 5 sr11 , Rhino 5.0 SDK , PseuDebug x64.

This ver "Build:succeeded,but run this sample has error.

Thank you.
(Thank you for your OpenIges sample)

You need to modify your project and make Rhino.exe your debug target.

1 Like

I solve it.

Thank you Dale.