Open sandboxFocusImprove this doc

PS0304: License Key Expired or Revoked

Severity Warning
Reported by PostSharp
Message <Reason>

Cause

Before it builds a project, PostSharp reads every license key that the project and the machine supply: the PostSharpLicense MSBuild property or environment variable, the License elements of the postsharp.config files, and the license keys registered on the machine. PostSharp reports PS0304 for each license key that was valid once and can no longer be used:

  • The validity period of the key has ended, as for an evaluation key.
  • The subscription of the key ended before the release of the version of PostSharp that builds the project. A license key lets you use the versions of PostSharp released before the end of its subscription.
  • The key has been revoked.

<Reason> names the license by its identifier, says why it cannot be used, and names where the key was found, for example Cannot use the license '<LicenseId>': the license key has expired. The license key originates from <Source>. It never quotes the key itself.

PS0304 is a warning: PostSharp ignores the key and builds the project with the other license keys. When none of them covers the project, PostSharp then reports PS0242.

This message depends on a license key that has expired or has been revoked, so no example can show it.

Resolution

  • When you renewed your subscription, register the new license key and remove the old one, from the property, the file or the registration where the message says it is set. See Deploying License Keys.
  • When the subscription ended before the release of the version of PostSharp that you use, renew the subscription, or use a version of PostSharp released before the end of the subscription.
  • When an evaluation key has expired, register a commercial license key, or the free PostSharp Essentials edition. See PostSharp Essentials.
  • When the key has been revoked, contact PostSharp support.

See Also

Other Resources

Deploying License Keys
License Troubleshooting
PostSharp Essentials