Error codes returned by package validation
This reference article lists all the error codes generated by package validation.
List of error codes
| Diagnostic ID | Description | Recommended action |
|---|---|---|
| PKV0001 | A compile-time asset for a compatible framework is missing. | Add the appropriate target framework to the project. |
| PKV0002 | A run-time asset for a compatible framework and runtime is missing. | Add the appropriate asset for corresponding runtime to the package. |
| PKV0003 | A run-time independent asset for a compatible framework is missing. | Add the appropriate run-time independent target framework to the project. |
| PKV0004 | A compatible run-time asset for a compile-time asset is missing. | Add the appropriate run-time asset to the package. |
| PKV0005 | A compatible run-time asset for a compile-time asset and a supported runtime identifier is missing. | Add the appropriate run-time asset to the package. |
| PKV0006 | The target framework is dropped in the latest version. | Add the appropriate target framework to the project. |
| PKV0007 | The target framework and runtime identifier pair is dropped in the latest version. | Add the appropriate target framework and RID to the project. |
| CP0001 | A type, enum, record, or struct visible outside the assembly is missing in the compared assembly when required to be present. | Add the missing type to the assembly where it is missing. |
| CP0002 | A member that is visible outside of the assembly is missing in the compared assembly when required to be present. | Add the missing member to the assembly where it is missing. |
| CP0003 | Some part of the assembly identity (name, public key token, culture, retargetable attribute, or version) does not match on both sides of the comparison. | Update the assembly identity so that both sides match. |
| CP0004 | A matching assembly was not found on one side of the comparison when creating the assembly mapping. | Make sure the missing assembly is added to the package. |
| CP0005 | An abstract member was added to the right side of the comparison to an unsealed type. | Remove the abstract member or don't annotate it as abstract. |
| CP0006 | A member was added to an interface without a default implementation. | If the target framework and language version support default implementations, add one, or just remove the member from the interface. |
| CP0007 | A base type on the class hierarchy was removed from one of the compared sides. | Add the base type back (a new base type can be introduced in the hierarchy if that's intended). |
| CP0008 | A base interface was removed from the interface hierarchy from one of the compared sides. | Add the interface back to the hierarchy. |
| CP0009 | A type that was unsealed on one side was annotated as sealed on the other compared side. | Remove the sealed annotation from the type. |
| CP0010 | The underlying type of an enum changed from one side to the other. | Change the underlying type back to what it was previously. |
| CP0011 | The value of a member in an enum changed from one side to the other. | Change the value of the member back to what it was previously. |
| CP1001 | A matching assembly could not be found in the search directories. (Not applicable for Package Validation, only when using API Compat directly.) | Provide the search directory when loading matching assemblies using the AssemblySymbolLoader. |
| CP1002 | A reference assembly was not found when loading the assemblies to compare in the resolved directories for the current target framework. | Include the directory path where that assembly can be found using the following MSBuild item: <PackageValidationReferencePath Include="<path>" TargetFramework="<tfm>" />. |
| CP1003 | There was no search directory provided for the target framework moniker that the package validation is running API Compat for. | Provide the search directory to find references for that target framework using the following MSBuild item: <PackageValidationReferencePath Include="<path>" TargetFramework="<tfm>" />. |
Feedback
Issottometti u ara feedback għal