Visual Studio Release Error

When I am trying to run the most basic Rhino Plugin Template in Visual Studio 2022, I receive the following error.

I installed the RhinoCommon Extension
I started a basic My Rhino Plugin 1
When I tried to run Debug, it started the Rhino, but didn’t have that most basic command appear
When I tried to run it in Release mode, it gave me following error.

image

Any suggestion to how to fix it?

Assigned to Rhino Developer category.

1 Like

Hi @Shasan_Chokshi

A Rhino plugin is just a dll or class library. So to run (debug) the project you need to tell visual studio to launch Rhino.

I’ve just made a new project using the rhino template and at least for me it does launch rhino automagically.

For existing projects i take this approach:

On the Debug Menu choose the last option Debug Properties then check that the Executable is set to C:\Program Files\Rhino 7\System\Rhino.exe so that visual studio knows to launch Rhino

For new projects you can check that the Solution File has the following entry in them

  <PropertyGroup Condition="$(Configuration) == 'Debug' AND $([MSBuild]::IsOSPlatform(Windows))">
    <StartProgram>C:\Program Files\Rhino 7\System\Rhino.exe</StartProgram>
    <StartArguments></StartArguments>
    <StartAction>Program</StartAction>
  </PropertyGroup>

Hope that helps & good luck with your plugin