-
-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default Plugin Versions to AssemblyVersion when not provided #618
base: main
Are you sure you want to change the base?
Conversation
49cdae2
to
0b2d9a1
Compare
if (Plugin is BasePlugin basePlugin) | ||
{ | ||
// if no override we look for assembly version | ||
if (basePlugin._version == "<unknown>") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe basePlugin.ModuleVersion
instead of the backing field?
@@ -52,7 +54,7 @@ public BasePlugin() | |||
} | |||
|
|||
public abstract string ModuleName { get; } | |||
public abstract string ModuleVersion { get; } | |||
public virtual string ModuleVersion { get => _version; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried loading a plugin compiled with this API against an older version of CS#? Does it complain about the virtual/abstract change when its being invoked or does it generate the same IL code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if I recall correctly I did not, but I'll check today
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the other way around would also be good, so old plugin against new CS#.
#340
Output 1
Output 2