I would like to ask what is Coff Settings GrasshopperDeveloperSettings.
By default it is on.
But the problem I have is that I cannot run native C++ wrapper on .NET environment.
Only when I turn off Coff settings grasshopper components finds the .dll and it works.
So my question is why Grasshopper does not find native dll when Coff are on?
Because grasshopper will copy the files in memory. And if the assembly (the .net assembly) tries to look up “Where am I?”, it finds itself the Grasshopper Matrix, rather than somewhere on the filesystem, and can’t find the non-.net dll’s its looking for.
You can easily solve this by only turning on COFF loading for specific plugins, by selecting Load From Disk, in the grasshopper “Solver” Settings.
Really? It was on by default for me, and I turned in off to make Petras’ last plug-in work: OpenNest | Food4Rhino
As you can see in the comment thread many people have the same issue.
I am not familiar at all with this setting, so I might I have said something wrong.
The checkbox highlighted in the image above was ON for me by default, and I guess that particular default setting is the same for everyone. I think it applies to the library folder, therefore to all plug-ins. After unchecking the box, I could make Opennest work without any trouble.
Is there any possibility to add some bit of code inside my visual studio project, that Coff-on and Coff-off property would not make any difference? It is needed to turn off to find native C++ library. If it is a must to turn off Coff settings then I will just add instructions how to install this add-on correctly.
Yes, that is the application wide setting, it is however settable from code and by changing the grasshopper settings xml files, which a plugin installer may choose to do.
These days there is an override setting per plugin as well, and plugins may request a specific option, but those are a fairly recent addition.
The more time goes by the harder I wish I never added COFF loading. The troubles it has caused far outweigh the benefits.
Hi Petras,
If I am not mistaken, you should be able to tweak this setting here, by accessing %appdata%\Grasshopper\grasshopper_kernel.xml and overwriting the file.
You can manually tweak the setting per plugin via the Grasshopper preferences UI.
You can set the application default via the _GrasshopperDeveloperSettings command.
You can specify a preference for your own plugin by assigning an assembly attribute which looks like: