0
0
mirror of https://github.com/sp-tarkov/assembly-tool.git synced 2025-02-12 16:50:44 -05:00
assembly-tool/ReCodeItCLI/Commands/GetRuntimeVersion.cs

25 lines
690 B
C#

using CliFx;
using CliFx.Attributes;
using CliFx.Infrastructure;
using ReCodeItCLI.Utils;
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)
{
Debugger.TryWaitForDebuggerAttach();
var module = DataProvider.LoadModule(AssemblyPath);
Logger.LogSync($"Target Runtime Version: {module.RuntimeVersion}");
return default;
}
}