Microsoft.Security.CodeIntegrity
3.1.4
Prefix Reserved
Requires NuGet 2.5 or higher.
dotnet add package Microsoft.Security.CodeIntegrity --version 3.1.4
NuGet\Install-Package Microsoft.Security.CodeIntegrity -Version 3.1.4
<PackageReference Include="Microsoft.Security.CodeIntegrity" Version="3.1.4" />
<PackageVersion Include="Microsoft.Security.CodeIntegrity" Version="3.1.4" />
<PackageReference Include="Microsoft.Security.CodeIntegrity" />
paket add Microsoft.Security.CodeIntegrity --version 3.1.4
#r "nuget: Microsoft.Security.CodeIntegrity, 3.1.4"
#:package Microsoft.Security.CodeIntegrity@3.1.4
#addin nuget:?package=Microsoft.Security.CodeIntegrity&version=3.1.4
#tool nuget:?package=Microsoft.Security.CodeIntegrity&version=3.1.4
Microsoft.Security.CodeIntegrity
Microsoft.Security.CodeIntegrity provides APIs for reading, validating, and converting Windows App Control for Business policy data. The package targets .NET Framework 4.6.2, .NET 8, and .NET 9.
Breaking change in version 3
Version 3.0.0 moved the ConfigCI implementation from the inbox Microsoft.ConfigCI.Commands.dll assembly into this package. Types previously exposed from the Microsoft.SecureBoot.UserConfig namespace now use Microsoft.Security.CodeIntegrity or Microsoft.Security.CodeIntegrity.ConfigCi. Please check MIGRATION.md for more info.
This affects compiled applications and PowerShell scripts that explicitly reference the old CLR type names. PowerShell scripts that invoke ConfigCI cmdlets without explicitly naming their implementation types are generally unaffected.
Common replacements:
| Old type | New type |
|---|---|
Microsoft.SecureBoot.UserConfig.Rule |
Microsoft.Security.CodeIntegrity.ConfigCi.Rule |
Microsoft.SecureBoot.UserConfig.DriverFile |
Microsoft.Security.CodeIntegrity.ConfigCi.DriverFile |
Microsoft.SecureBoot.UserConfig.Eku |
Microsoft.Security.CodeIntegrity.ConfigCi.Eku |
Microsoft.SecureBoot.UserConfig.CIPolicyException |
Microsoft.Security.CodeIntegrity.CIPolicyException |
global::SiPolicy |
Microsoft.Security.CodeIntegrity.SiPolicy |
The old DriverFile(AppxPackage) constructor is not available. Use DriverFile(packageFamilyName, packageVersion) or the New-CIPolicyRule -Package PowerShell parameter.
The package also contains MIGRATION.md with the complete migration guidance.
Package usage
<PackageReference Include="Microsoft.Security.CodeIntegrity" Version="3.1.4" />
Example:
using Microsoft.Security.CodeIntegrity;
using System.IO;
using FileStream xmlInput = File.OpenRead(xmlPolicyPath);
using var binaryOutput = new MemoryStream();
Policy.ConvertFromCodeIntegrityPolicy(xmlInput, binaryOutput);
File.WriteAllBytes(binaryPolicyPath, binaryOutput.ToArray());
Standalone XML schemas
The package includes these files for schema inspection of the underlying policy XML:
schemas\cipolicy.xsd
schemas\ApplicationManifest.xsd
Build and test
Build the library:
dotnet build Microsoft.Security.CodeIntegrity\Microsoft.Security.CodeIntegrity.csproj -c Release
Run the tests:
dotnet test LibTests\LibTests.csproj -c Release
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.6.2
- Microsoft.Bcl.Cryptography (>= 9.0.0)
- System.Buffers (>= 4.6.1)
- System.Formats.Asn1 (>= 9.0.0)
- System.Memory (>= 4.6.3)
- System.Net.Http (>= 4.3.4)
- System.Numerics.Vectors (>= 4.6.1)
- System.Runtime.CompilerServices.Unsafe (>= 6.1.2)
- System.Security.Cryptography.Algorithms (>= 4.3.1)
- System.Security.Cryptography.Encoding (>= 4.3.0)
- System.Security.Cryptography.Pkcs (>= 9.0.0)
- System.Security.Cryptography.Primitives (>= 4.3.0)
- System.Security.Cryptography.X509Certificates (>= 4.3.2)
- System.ValueTuple (>= 4.6.1)
-
net8.0
- Microsoft.Win32.Registry (>= 5.0.0)
- System.Diagnostics.EventLog (>= 9.0.0)
- System.Management (>= 9.0.0)
- System.Security.Cryptography.Pkcs (>= 9.0.0)
-
net9.0
- Microsoft.Win32.Registry (>= 5.0.0)
- System.Diagnostics.EventLog (>= 9.0.0)
- System.Management (>= 9.0.0)
- System.Security.Cryptography.Pkcs (>= 9.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.1.4 | 60 | 9/14/2026 |
| 3.1.3 | 95 | 9/8/2026 |
| 3.1.2 | 132 | 8/11/2026 |
| 3.1.1 | 208 | 6/3/2026 |
| 3.1.0 | 206 | 5/21/2026 |
| 3.0.0 | 138 | 4/23/2026 |
| 2.1.0 | 107 | 4/10/2026 |
| 2.0.0 | 110 | 3/17/2026 |
| 1.5.1 | 107 | 2/23/2026 |
| 1.5.0 | 105 | 2/4/2026 |
| 1.3.0 | 392 | 11/17/2025 |
| 1.2.1 | 250 | 11/3/2025 |
| 1.2.0 | 223 | 10/23/2025 |
| 1.1.0 | 6,693 | 2/18/2021 |
| 1.0.1 | 900 | 7/31/2019 |
| 1.0.0 | 827 | 7/18/2019 |
BREAKING CHANGE introduced in 3.0.0: ConfigCI implementation types moved from
Microsoft.ConfigCI.Commands.dll and the Microsoft.SecureBoot.UserConfig namespace
to Microsoft.Security.CodeIntegrity.dll. Rule, DriverFile, Eku, and related types
are now under Microsoft.Security.CodeIntegrity.ConfigCi. CIPolicyException is under
Microsoft.Security.CodeIntegrity. No CLR type-forwarding compatibility layer is provided.
PowerShell scripts that invoke ConfigCI cmdlets without explicitly naming CLR types are
generally unaffected. See MIGRATION.md in the package for migration guidance.