Add native .NET assembly reference to Component (eg. System.Net)

I can reference external DLLs, but what to do if I need to use standard .Net libraries like System.Net.Sockets others that are not listed by default? (In a scripted component, c#)

It’s a bit of a pain, but you’ll have to find where on the system those dlls are located. The .NET framework stuff tends to be in the same place, but you’ll have to pick the right version to work with.

thanks! found it… not so nice for distribution, but works for now

In case anyone has the same problem:

1 Like

An alternative would be to create a compiled component with that DLL referenced. Then you’d have to distribute the add-in, but users would not have to find that file on their machine.

1 Like

Works well in Rhino 7
Rhino 8 Grasshopper
try to
#r “C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.6\System.Speech.dll”;
does not work.
What do I wrong?