<publisherPolicy> Element

Specifies whether the runtime applies publisher policy.



<publisherPolicy apply="yes|no"/>  

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.


Attribute Description
apply Specifies whether to apply publisher policy.

apply Attribute

Value Description
yes Applies publisher policy. This is the default setting.
no Does not apply publisher policy.

Child Elements


Parent Elements

Element Description
assemblyBinding Contains information about assembly version redirection and the locations of assemblies.
configuration The root element in every configuration file used by the common language runtime and .NET Framework applications.
dependentAssembly Encapsulates binding policy and assembly location for each assembly. Use one <dependentAssembly> element for each assembly.
runtime Contains information about assembly binding and garbage collection.


When a component vendor releases a new version of an assembly, the vendor can include a publisher policy so applications that use the old version now use the new version. To specify whether to apply publisher policy for a particular assembly, put the <publisherPolicy> element in the <dependentAssembly> element.

The default setting for the apply attribute is yes. Setting the apply attribute to no overrides any previous yes settings for an assembly.

Permission is required for an application to explicitly ignore publisher policy using the <publisherPolicy apply="no"/> element in the application configuration file. The permission is granted by setting the SecurityPermissionFlag flag on the SecurityPermission. For more information, see Assembly Binding Redirection Security Permission.


The following example turns off publisher policy for the assembly, myAssembly.

      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">  
            <assemblyIdentity name="myAssembly"  
                                    culture="neutral" />  
            <publisherPolicy apply="no"/>  

See also