mirror of
https://github.com/sp-tarkov/assembly-tool.git
synced 2025-02-12 15:10:44 -05:00
add getruntimeversion command
This commit is contained in:
parent
9830004f42
commit
ceb7bf8b39
22
ReCodeItCLI/Commands/GetRuntimeVersion.cs
Normal file
22
ReCodeItCLI/Commands/GetRuntimeVersion.cs
Normal file
@ -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;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user