The Grasshopper C# editor ... only main assemblies are loaded

After Rhino Update to Rhino 6.6 in grasshopper C# editor only these assemblies are loaded:

using System;
using System.Collections;
using System.Collections.Generic;

using Rhino;
using Rhino.Geometry;

using Grasshopper;
using Grasshopper.Kernel;
using Grasshopper.Kernel.Data;

Now imagine how linq expressios have to be written in such cases and other grasshopper types, also using kangaroo.dll I have to specify each type from basic namespace as other assemblies are not loaded. All extensions methods in all loaded libraries not working so I have to write really long sentences to do even simple stuff…

How to solve this issue? Did this happen to someone else?

P.S. I love this editor.

Did you open an existing script component or a new one?

New ones have fewer standard using statements, but an editable using section. For pre-existing components the usual namespaces should appear in the editable section.

Just restarted computer opened new rhino file new gh file new c# editor component.

Same stuff.

No full list of namespaces.

If I load any library it is not shown in the list and the only way to access is like this KangarooSolver.IGoal or in case of linq like this System.Linq.Enumerable.Reverse()

And the same stuff is for old ones. The main issue is asked is that all the things I created before simply do not work because of this referencing.

For me it would be ok if those system references are not shown. But incase you have extension methods in library and you cannot use it is really annoying.

This is troubling, existing components should have retained all those extra using statements and put them in the editable portion.

Can you send me a file with an existing C# component which no longer works when opened now?

This bit is expected and by design. If you need Linq, or if you referenced Kangaroo, then you must now specifically state the namespaces you with to use yourself.

Thanks, I will send you file in a minute, what about if a library that has extension methods?
In this design decision it is not possible to use them?

Yeah just add your own using Kangaroo; statement on line 12.

1 Like

Ah this is the way it works. It seems somebody is working to make that C# editor better
( SpongeBob SquarePants Rainbow)

Thanks a lot.

No I got it and solved this issue.


I was getting complaints from people who had referenced a lot of additional assemblies and their auto-generated using block was getting both out of hand and causing type name ambiguities. It’s a bit more expertish now, but hopefully improved.


Much much better.

// Rolf

1 Like

+1 for opening up the using section.

But do you or don’t you have existing gh files with components which no longer work?

It changes from file to file for old components.

Meaning sometimes all references are added in a list after main assemblies are added.
And sometimes that line is simply empty.

I’d really like to have one of those files that fail to load with all references. Remember, it cannot be saved with the new version because then I can’t test why it didn’t open an old version correctly.

I attached the file.
Can it be that it happened because the component was disabled?
Other files seemed to reference .dll good. (1003.5 KB) (875.2 KB)

Thanks, looking into it once out of food-coma.

Don’t eat and program at the same time. VS should have a Breathalyzer lock to keep eataholics away from serious stuff. :sunglasses:

// Rolf

are you still working on that pizza?

Mash with chives from the garden, sausages and green asparagus today.

1 Like

This file was already saved with the new version. It has a CustomUsing block:

At this point it opens correctly because it has a blank custom using block and it detects that it doesn’t have to fill in the additional namespaces.