Grasshopper

algorithmic modeling for Rhino

C# Visual Studio Grasshopper Assembly External Package use problem

Dear friends and developers,

I am trying to create my own component in Visual Studio/Grasshopper Assembly which is going to be an optimizer. I am using a NuGet package which is called GAF (Genetic Algorithm Framework). It works properly in Visual Studio, even when I put the script in Grasshopper Assembly, it builds the solution successfully; but when I put the new component in Grasshopper there is an error which says:

"1. Solution exception: Could not load file or assembly 'GAF, Version=2.3.0.22457, Culture=neutral, PublicKeytoken=null' or one of its dependencies. the system cannot find the file specified."

I would appreciate it if somebody gives me some clues that how I can solve this error.

Thank you very much in advance.

cheers

Saeed

Views: 897

Attachments:

Replies to This Discussion

Is the GAF.dll still next to the *.gha file you're loading?

And what does "it works properly in Visual Studio" mean? While debugging your gha project?

Dear David Thanks for your consideration.

First I should say, as Petras said, I added the GAF.dll file in the grasshopper library and now I don't get that error anymore. 

No, that GAF.dll is not next to the .gha file, it is in the folder of the packages when I build the solution.

 By "it works properly in Visual Studio", since I am at the beginning of my way and I'm not that good in this, first I tested the code in Visual Studio and it worked there properly, then I tried to see if the code works in Grasshopper too and I got that error. Now, I am trying to define Input Parameters and Output parameters in the code to make it useful in Grasshopper.

Just add .dll file of that library to grasshopper library folder

Thaks a lot Petras for your help.

I added the GAF.dll to the Components folder of Grasshopper plugin and I don't get that error anymore.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service