I’m trying to get the semantic version of my plugin during runtime.
I’m defining the version in the .csproj as follows:
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> ... <Version>1.0.0-alpha</Version> ... </PropertyGroup> ...
When I run yak spec the above version is correctly shown in the created manifest file.
However, I haven’t been able to get the version in code.
From what I’ve gathered the Version tag in .csproj files should be equivalent to the AssemblyInformationalVersionAttribute but when I try to read that:
the GetEntryAssembly() method returns null
I have also tried getting the version through the Plugin.Version property but that returns 18.104.22.168 and not the desired 1.0.0-alpha