获取本机.NET Framework版本
using System;
using System.Runtime.InteropServices;
namespace ConsoleApp3
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(RuntimeInformation.FrameworkDescription);
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net46" />
</packages>

浙公网安备 33010602011771号