title: Unable to sign a XAP file
body: <p>I'm trying to sign a Silverlight 4 OOB application (XAP file).<br>
  I use the following command:  </p>
  
  <pre><code>"C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\signtool.exe" sign /v /f path\to\FILENAME.pfx /p PWD path\to\FILENAME.xap
  </code></pre>
  
  <p>and I get the response:</p>
  
  <pre><code>The following certificate was selected:
      Issued to: COMPANY NAME
      Issued by: Thawte Code Signing CA
      Expires:   Wed Dec 01 00:59:59 2010
      SHA1 hash: AE57AF01180BF995C7C5B01E235F296CCF611111
  
  Done Adding Additional Store
  Successfully signed: FILENAME.xap
  
  Number of files successfully Signed: 1
  Number of warnings: 0
  Number of errors: 0
  </code></pre>
  
  <p>But the XAP file is not signed.<br>
  If I view properties in explorer there are no 'Digital Signatures' listed. And if I try and install it I get the unverified dialog.<br>
  If I use exactly the same command but for a dll file, the signing works fine and I can see the digital signature applied to the file.</p>
  
  <p>What could be the cause of this?<br>
  Do I need a different version of <code>signtool.exe</code>?</p>
  
  <p>If it matters, the PFX was originally exported from an XP machine and I'm trying to run this on a Win7 machine (for dev) and a Win2008 server (build machine) and get the same behaviour on both.</p>
  
  <p><strong>Edit:</strong><br>
  If I verify the certificate of the signed DLL I get the following:</p>
  
  <pre><code>SignTool Error: A certificate chain processed, but terminated in a root 
          certificate which is not trusted by the trust provider.
  </code></pre>
  
  <p>So it looks like I need to install some root certificates.</p>
  
  <p>However, I'm not sure that explains why the XAP file doesn't report any certificate being added.</p>