Adding img to YAK packages when using Visual Studio

When using the most recent Visual Studio Plugin wizard to start a GH plugin project, I have the option to build a .yak package directly — Actually if I choose to multi-target, this seems to be the only way.

However, I cannot find a place to add the icon that’s going to show in PackageManger in Rhino.

I had a script to build yak manually before, and added the icon and label to the manifest.yml.

So how should I do it now in Visual Studio?

The build yak option is something we’re working on to make the templates more “batteries included”.

This is not currently possible with the automatic system, if you need an icon, for now, using the manual solution is the best system.

1 Like

Thanks for the answer.

For those whose encounter the same issue and checked this post –

The .yak is actually just a .zip file. You can open it with a unzip programme and add the icon file and change the manifest.yml inside.

Tested, and it works.

And for manual solution, how do you include all targets in one yak file? Just pack all the folders from the bin and that’s it?

(I checked the files inside .yak and it seems like so.)

Yes, for Rhino 8 and up, you pack the net48/net7.0/net9.0 etc.
For Rhino 7 you pack inside the net48 folder.

I just tried pushing a .yak file with net48 folder targeting Rhino 7, and net7.0 targeting Rhino 8. It successfully pushed, and I was able to install on Rhino 7 and 8. The only issue is that Rhino 8 would enable the plugin right away and you can see it in the plugin manager, whereas Rhino 7 installs it but has trouble finding the rhp. I couldn’t figure it out so I re-pushed with the payload for R7 directly in the yak file, and R8 payload in net7.0. And that worked with Rhino 7 enabling the plugin automatically. Not sure if there is a less hacky way to address this but that has been my experience

@Tim_Li the yak package for Rhino 7 needs to be the content inside the net48 folder, it cannot be the net8 folder itself. I believe that might be where you’re having trouble.

You would ideally push a R7 yak and a R8+ yak as 2 separate uploads under the same package name.

Yeah, that’s what I did- Rhino 7 content inside net4.8, and 8 inside net7. On that yak push, it picked up both platforms. However, after installing, Rhino 7 didn’t find it and enable it automatically in the plugin manager. I then tried a 2nd yak push where I had the Rhino 7 content outside of the net4.8 folder directly where the manifest.yml was and left Rhino8 content in net7 folder. Then everything worked automatically for both 7 and 8 in one push.

This message, together with any attachments, is intended only for the use of the individual or entity to whom it is addressed and may contain information that is privileged and confidential. If you have received this message in error, please notify the original sender, SHoP, by return e-mail and delete the message, along with any attachments, from your computer. Thank you.

Apologies @Tim_Li I’m a bit confused.

Are you building the packages as described here?

Callum, no worries. Yeah that’s what I followed, and Rhino 7 was having trouble finding/enabling the plugin automatically.
It turns out for what I was doing they didn’t need to be separate binaries for .net4.8 and .net7, so I just had everything in the same hierarchy as the manifest.yml and that worked.

Thanks,
Tim

This message, together with any attachments, is intended only for the use of the individual or entity to whom it is addressed and may contain information that is privileged and confidential. If you have received this message in error, please notify the original sender, SHoP, by return e-mail and delete the message, along with any attachments, from your computer. Thank you.

1 Like

Great!