Added some debug only features and target windows only

This commit is contained in:
Andrew Lee 2021-01-09 11:44:29 -05:00
parent 2115d78c52
commit 8f8ed50342
2 changed files with 7 additions and 1 deletions

View file

@ -2,7 +2,9 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net5.0-windows</TargetFramework>
<Authors>Andrew Lee</Authors>
<Copyright>(C) Copyright 2021 Andrew Lee</Copyright>
</PropertyGroup>
<ItemGroup>

View file

@ -7,9 +7,13 @@ namespace FakeCMD
{
static void Main(string[] args)
{
#if DEBUG
Console.WriteLine("You are running .NET {0}", Environment.Version.ToString());
#endif
RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion");
var buildNumber = registryKey.GetValue("UBR").ToString();
Console.WriteLine($"Microsoft Windows [Version {buildNumber}]");
Console.ReadLine();
}
}
}