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

25 lines
690 B
C#
Raw Normal View History

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