diff --git a/ReCodeItCLI/Commands/GetRuntimeVersion.cs b/ReCodeItCLI/Commands/GetRuntimeVersion.cs new file mode 100644 index 0000000..41577fc --- /dev/null +++ b/ReCodeItCLI/Commands/GetRuntimeVersion.cs @@ -0,0 +1,22 @@ +using CliFx; +using CliFx.Attributes; +using CliFx.Infrastructure; +using ReCodeItLib.Utils; + +namespace ReCodeItCLI.Commands; + +[Command("GetRuntimeVersion", Description = "Prints out the .net runtime version this assembly targets")] +public class GetRuntimeVersion : ICommand +{ + [CommandParameter(0, IsRequired = true, Description = "The absolute path to your dll.")] + public required string AssemblyPath { get; init; } + + public ValueTask ExecuteAsync(IConsole console) + { + var module = DataProvider.LoadModule(AssemblyPath); + + Logger.LogSync($"Target Runtime Version: {module.RuntimeVersion}"); + + return default; + } +} \ No newline at end of file