Trouble with Rhino Folder while debugging

Hi,

In our office we are using source control to collaboratively work on our Plug-In projects.

Now we have trouble debugging this Project.

My colleague is working on a new computer and it seems like the default Rhino Location name has changed
from “Rhinoceros 5.0 (64-bit)” to “Rhinoceros 5 (64-bit)” skipping the “.0” from the path.

Since the debugging location is set in the .csproj File, it either works on one or the other machine.

I’d rather not change the location of the Rhino Install - if not necessary.
(It’s probably not done by renaming the folder)

Is there a way around - is it possible to set alternative “StartProgram” Values in the csproj ?

Thanks
Martin

You could either manually edit the .csproj in a text editor, or in Visual Studio for project settings change the Start Action for the Debug section. Browse to the correct location and select the Rhino.exe you need to start.

/Nathan

Changing it isn’t the problem.

But the setting needs to be different for each machine that connects to the Cloud Source Control. If I change it and sync my file, the other machine won’t be able to debug.

(The Problem is probably not only a Debug Folder Problem - probably references to the RhinoCommon.dll, etc. will be effected, too)

Is there a System Variable I could insert for Rhino. (Basically let the Computer Look up where Rhino has been installed and use this folder)

Thanks
Martin

Can’t you add an extry property like: Debug64-5.0|AnyCPU that redirects to the 5.0 version? Then you only have to pick another debugger from Visiual Studio.

I got this for 32 bit and 64 bit:

  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug32|AnyCPU' ">
    <StartArguments>
    </StartArguments>
    <StartAction>Program</StartAction>
    <StartProgram>C:\Program Files (x86)\Rhinoceros 5\System\Rhino4.exe</StartProgram>
  </PropertyGroup>
  <PropertyGroup>
    <FallbackCulture>en-US</FallbackCulture>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug64|AnyCPU'">
    <StartProgram>C:\Program Files\Rhinoceros 5 (64-bit)\System\Rhino.exe</StartProgram>
    <StartArguments>
    </StartArguments>
    <StartAction>Program</StartAction>
  </PropertyGroup>

Maybe one for 5 and the other for 5.0

Besides Jordy’s method, either you or your colleague can add a .csproj.user file, at the same location of your .csproj file, containing something akin to this (edit the path):

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug64|AnyCPU'">
    <StartProgram>C:\OtherPathTo\Program Files\Rhinoceros 5 (64-bit)\System\Rhino.exe</StartProgram>
    <StartArguments>
    </StartArguments>
    <StartAction>Program</StartAction>
  </PropertyGroup>
</Project>

This path will take priority over the one stored in .csproj.
If the .csproj file is called myplugin.csproj, then your user file should be called myplugin.csproj.user.

Giulio

Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

Thanks!

The overwrite with the .user file sound like a cleaner solution somehow since “Rhinoceros 5.0 (64-bit)” is the "legacy path.

@piac : It replaces the whole file, rather than just the mentioned entries? Correct?

It overrides only the mentioned ones. The rest is unchanged.