简体   繁体   中英

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?

The latest version of Windows API Code Pack is 1.1 but there doesn't seems to be a dedicated page for it.

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. You cannot go lower than 3.5, it has a dependency on System.Core.dll. Targeting .NET 4.x is not a known problem.

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.

The actual code of the Windows API Code Pack is compatible with .NET 3.5 and above. .NET 4 or 4.5 certainly won't be a problem.

I just downloaded the NuGet package using Install-Package WindowsAPICodePack-Core and it works for .NET 3.5.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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