3
votes

We have an 'offline' Windows application that wraps an ASP.NET application in an Internet Explorer control within a Windows form. Therefore we have a sub-tree in the application folder that is the entire online/web application, and this is launched and run within the wrapping offline application EXE file.

This has resulted in some assemblies being present as both a direct reference from the offline application EXE file and also part of the online application sub-folder. This works fine when deploying the application by doing a manual copy of the entire application folder tree. However, a ClickOnce deployment fails at installation time when validating the ClickOnce application manifest - I've honed in on the duplicate assemblies as the problem, if I remove these assemblies from the online application sub-tree (leaving just one copy of each in the root folder) and rebuild/sign the application manifest without them then the validation succeeds and the application is installed - but without the assemblies I removed of course.

=== UPDATE ===

A new version of mage.exe was provided for .NET 4 (the newer copy is part of Windows SDK v7.1 - in the NETFX 4.0 Tools folder), and the new version exhibits different behaviour for duplicate assemblies.

In the application manifest created by Mage v3.x the duplicates are listed using 'file' elements as follows:

  <file name="foo.dll" size="123456">
    <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>JFifxtn6vhCtaiom4tzJ+pcgqT0=</dsig:DigestValue>
    </hash>
  </file>

and warnings of the following form are generated:

Warning MSB3178: Assembly'\AppFiles\fooApp_2.9.186.3\foo.dll' is incorrectly specified as a file.

In fact both duplicate files are listed like this, that is, neither is listed as a 'dependentAssembly', which is clearly wrong.

However, Mage v4 creates a 'dependentAssembly' entry for both files and warning of the form:

Warning MSB3112: Two or more assemblies have the same identity 'foo, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0123456789012345, ProcessorArchitecture=msil'.

The two entries are identical except for the path (defined on the 'codebase' attribute), but at installation time the ClickOnce installer fails if a deployment contains such entries with a vague error:

the manifest may not be valid or the file could not be opened.

1

1 Answers

0
votes

You have to either rename any one of them and use. Also try with different versions and publickey token for each assembly