How to set plugin version by AssemblyInfo.cs

Inspired by this documentation: Rhino - Creating and Deploying Plugin Toolbars (rhino3d.com)

I have added the required code snippet to this method:

protected override LoadReturnCode OnLoad(ref string errorMessage)

So that I would be able to trigger a re-stage of my plugin RUI file when I increment the plugin version.

But I don’t know how to actually increment the plugin version. Should I modify the Properties\AssemblyInfo.cs file? If so, which statements need to be added to that file?

Thanks.

Yes.

Some "SDK-style` .NET plug-in will have the version number embeddded in the .vcproj file.

In either case, pressing will bring up your project properties and give you access to this.

– Dale

1 Like

Should I add these statements to the Properties\AssemblyInfo.cs file?

// Set the version information
[assembly: AssemblyVersion("1.2.3.4")]
[assembly: AssemblyFileVersion("1.2.3.4")]

When I add the above statements, then I run the following command to generate the manifest file for my plugin:

# Inside /c/Users/m3/source/repos/MyPlugin/pkg/dist
"C:\Program Files\Rhino 7\System\Yak.exe" spec

Then I observe that the version is NOT correct on the created manifest file:

---
name: MyPlugin
version: 1.0
authors:
- MyPlugin
description: My plugin tries to be a smart and full solution.

I don’t understand why. Maybe I’m missing something.