I want to compile my assembly using automatic versioning, but also be able to use that number for an attribute that is used to define the version of my BepInEx plugin.
Currently I have this in my AssemblyInfo.cs
:
[assembly: AssemblyVersion("2.1.*")]
That works great for automatic versioning of the .dll, but I’d like to extend this to the actual BepInPlugin version too:
[BepInPlugin("com.my.plugin", "My Plugin", "1.0.0")]
It can use a const
value.
I have tried following the BepInEx template repo to see how they do it, but it wouldn’t compile with my version, rather it ended up compiling into “2.1.*” which causes the plugin to fail to load. They create a file called “MyPluginInfo” which I can then read the values from.
Lacyway is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.