Managed wrappers for selected Windows Shell and desktop APIs, originally released by Microsoft as the Windows API Code Pack 1.1 and maintained here for modern .NET.
Active source: Source/Current/Windows API CodePack
License: MIT — see LICENSE
Roadmap: Source/Current/ROADMAP.md · Changes: Changelog.md
| Package | Contents |
|---|---|
| WindowsAPICodePack | Meta-package (all components) |
| WindowsAPICodePackCore | Task Dialogs, power, network list, restart/recovery |
| WindowsAPICodePackShell | Shell objects, Common File Dialogs, Explorer Browser, taskbar |
| WindowsAPICodePackSensors | Sensor platform |
| WindowsAPICodePackExtendedLinguisticServices | Extended Linguistic Services |
| WindowsAPICodePackShellExtensions | Preview handlers and thumbnail providers |
Target frameworks: .NET Framework 4.6.2–4.8.1 and .NET 8 / 9 / 10 (net*-windows). Windows desktop (WinForms/WPF) only.
DirectX from the original Code Pack is not shipped in 8.x. The Current tree keeps an unbuilt stub; see Components/DirectX/README.md.
If creating a TaskDialog throws NotSupportedException about comctl32.dll version 6, enable Common Controls v6 in the application manifest:
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*" />
</dependentAssembly>
</dependency>Visual Studio can cache the old DLL in-process; restart the IDE if the error persists after adding the manifest.
Optional during build. Disabled by default.
Certificate file:
<PropertyGroup>
<EnableAuthenticodeSigning>true</EnableAuthenticodeSigning>
<CodeSigningCertificatePath>path\to\your\certificate.pfx</CodeSigningCertificatePath>
<CodeSigningCertificatePassword>your-password</CodeSigningCertificatePassword>
</PropertyGroup>Certificate store:
<PropertyGroup>
<EnableAuthenticodeSigning>true</EnableAuthenticodeSigning>
<CodeSigningCertificateThumbprint>your-certificate-thumbprint</CodeSigningCertificateThumbprint>
</PropertyGroup>Requires Windows SDK (SignTool.exe). The build continues with a warning if signing fails. For GitHub Actions, see .github/workflows/README.md (CODESIGN_CERTIFICATE_BASE64, CODESIGN_CERTIFICATE_PASSWORD).
Source/Samples— mix of modernized and legacy demos; prefer samples that referenceSource/Current.Source/Original— archive of the Microsoft-era sources, tests, and full DirectX.
See CONTRIBUTING.md. Bug reports should include Windows version, TFM, and package version (template).