Rhino.Compute -- Type conflicts

Moving from this thread to a separate thread.

@scottd, I was trying to run the “TestCompute” example but I get an error. Something with the Sphere (on row 18 in the source) doesn’t seem to connect well.

I just downloaded and installed the latest WIP, and I can find the rhcommon_c.dll file on my disk, but I’m not able to add it to project references (and perhaps I’m not supposed to do that either but…?).

And I also couldn’t have the nuget package Rhino3dmIO.Desktop referenced because the compiler complained that some types in that package where already defined in RhinoCommon and so…

What do to fix this?

// Rolf


I noticed that I had installed the 6.27 version…, but now I have corrected that to the latest WIP version of the Nuget package, but I still get errors. I get the following:

|Error|CS0433|The type 'Point3d' exists in both 'Rhino3dmIO, Version=7.0.20168.13070, Culture=neutral, PublicKeyToken=null' and 'RhinoCommon, Version=7.0.20168.13075, Culture=neutral, PublicKeyToken=552281e97c755530'|TestCompute|D:\DEV\CAD\VS\RhinoCompute\TestCompute\TestCompute\Program.cs|17|Active|
|Error|CS0433|The type 'Sphere' exists in both 'Rhino3dmIO, Version=7.0.20168.13070, Culture=neutral, PublicKeyToken=null' and 'RhinoCommon, Version=7.0.20168.13075, Culture=neutral, PublicKeyToken=552281e97c755530'|TestCompute|D:\DEV\CAD\VS\RhinoCompute\TestCompute\TestCompute\Program.cs|17|Active|

// Rolf

You shouldn’t be referencing RhinoCommon, Rhino.UI, Rhino_DotNet, and RhinoWindows in your console app.

OK, makes sense…

However, now that I removed those references it compiles and starts running, but then crashes on "System.Net.WebException: 'The remote server returned an error: (401) Unauthorized.'

I tried to sneak in with ComputeServer.AuthToken = "scottd@mcneel.com"; (as in the code example) and also tried with my own email address, but no go:

// Rolf

That article needs some serious tuning up.

If you want to test your console app against our prototype compute server, you will need to modify that string to be the token that you get by visiting
https://www.rhino3d.com/compute/login

You can also just run a copy of compute on your own computer which does not require any auth token. It doesn’t look like we have good instructions for that yet.

1 Like

Okaaaay, that token made all the difference.

Yes, it would be useful to have a local test server.

For now I can continue playing around with Rhino.Inside which also is of interest.

// Rolf

That boils down to:

In your test app, you would change
ComputeServer.WebAddress = "http://localhost:8081";

1 Like

Runs beautifully.

Time to hit the sack. :zzz:

// Rolf