简体   繁体   English

Windows API代码包是否必须使用.NET 4.5

[英]Is .NET 4.5 mandatory for Windows API Code Pack

Is .NET 4.5 mandatory for using Windows API Code Pack (Microsoft.WindowsAPICodePack and Microsoft.WindowsAPICodePack.Sensors.dll) Will it work for .NET 4.0? 使用Windows API代码包(Microsoft.WindowsAPICodePack和Microsoft.WindowsAPICodePack.Sensors.dll)是否必须使用.NET 4.5?它是否适用于.NET 4.0?

The latest version of Windows API Code Pack is 1.1 but there doesn't seems to be a dedicated page for it. Windows API Code Pack的最新版本是1.1,但是似乎没有专用的页面。

The library was published when Windows 7 was released (replacing the "Vista Bridge" library), and targets the .NET Framework version that is pre-installed on Win7, version 3.5. 该库是在Windows 7发行时发布的(取代了“ Vista Bridge”库),并且以Win7 3.5版上预安装的.NET Framework版本为目标。 You cannot go lower than 3.5, it has a dependency on System.Core.dll. 您不能低于3.5,它对System.Core.dll具有依赖性。 Targeting .NET 4.x is not a known problem. 以.NET 4.x为目标不是一个已知问题。

Do keep the target operating system requirement in mind for the Sensor api , the underlying COM interface (ISensor et al) requires Windows 7 or higher and is not available on the Server edition. 请切记Sensor api的目标操作系统要求,底层的COM接口(ISensor等)需要Windows 7或更高版本,并且在Server版本上不可用。

The actual code of the Windows API Code Pack is compatible with .NET 3.5 and above. Windows API代码包的实际代码与.NET 3.5及更高版本兼容。 .NET 4 or 4.5 certainly won't be a problem. .NET 4或4.5当然不会有问题。

I just downloaded the NuGet package using Install-Package WindowsAPICodePack-Core and it works for .NET 3.5. 我刚刚使用Install-Package WindowsAPICodePack-Core下载了NuGet软件包,它适用于.NET 3.5。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM