This error occurs when code analysis analyzes an assembly and encounters permission attributes and at least one of the following conditions is true:

  • Code analysis cannot find the assembly that contains the attributes.

  • Code analysis does not have permission to load the assembly.

  • The assembly that is loaded by code analysis does not contain the attribute.

In most cases, the issue can be resolved by making sure that you have the most recent version of the code analysis tools.