セットアップから
Build Eventsを変えます。
Post-build event command line を以下のよう設定します。これでビルドするたびにGrasshopperのLibrariesのフォルダーに入ります。
Copy "$(TargetPath)" "$(TargetDir)$(ProjectName).gha"
Copy "$(TargetPath)" "%AppData%\Grasshopper\Libraries\$(ProjectName).gha"
Erase "$(TargetPath)"
コンポーネントの基礎情報を入れる
myFirstComponent.cs
public LearningGHPluginsComponent()
: base("myfirstComp", "MFC",
"This is my first component",
"GEL", "Tutorial")
{
}
コンポーネントのアイコンをつける
Projectを右クリックして、Propertiesへ行く。
Resourceにimageを加える。
myFirstComponent.cs
protected override System.Drawing.Bitmap Icon => Properties.Resources.reverse;