IL2003: Could not resolve dependency assembly specified in a 'PreserveDependency' attribute

Cause

The assembly specified in a PreserveDependencyAttribute could not be resolved.

Rule description

Trimmer keeps a cache with the assemblies that it has seen. If the assembly specified in the PreserveDependencyAttribute is not found in this cache, the trimmer does not have a way to find the member to preserve.

Example

// IL2003: Could not resolve dependency assembly 'NonExistentAssembly' specified in a 'PreserveDependency' attribute
[PreserveDependency("MyMethod", "MyType", "NonExistentAssembly")]
void TestMethod()
{
}