Question

I want use Intellilock 1.8 for locking a Outlook2010 Add-in package. It includes among other Mocrosoft VSTO dlls my custom signed dll and the manifest file with security hash. I provided project *.snk Key File when locking that dll but still receive an error when try to install the final package:

System.Deployment.Application.InvalidDeploymentException: File, OutlookAddIn2010.dll, has a different computed hash than specified in manifest.

The original Visual Studio Setup also automatically creates signed ClickOnce manifest. The main dll is mentioned in this section:

  <dependency>
    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="OutlookAddIn2010.dll" size="275968">
      <assemblyIdentity name="OutlookAddIn2010" version="2.7.0.0" publicKeyToken="DEDC24E24E6D7D88" language="neutral" processorArchitecture="msil" />
      <hash>
        <dsig:Transforms>
          <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
        </dsig:Transforms>
        <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
        <dsig:DigestValue>Vg17KBReMnOV9emW0ddVuN7AaIU=</dsig:DigestValue>
      </hash>
    </dependentAssembly>
  </dependency>
Was it helpful?

Solution

The solution is to apply IntelliLock signing before the main build. The solution is the same as in this question.

<Target Name="AfterCompile">
    <Exec Command="$(IntelliLockLocation) -project $(IntelliLockProject) -file &quot;$(ProjectDir)$(IntermediateOutputPath)$(TargetFileName)&quot; -targetfile &quot;$(ProjectDir)$(IntermediateOutputPath)$(TargetFileName)&quot;  -snkeypair &quot;$(ProjectDir)$(AssemblyOriginatorKeyFile)&quot; -snpassword *****" />
  </Target>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top