-1

I have a solution that references a dll on our network. When I build the solution to a .exe everything works fine.

When I publish the solution as a ClickOnce application I get an error telling me that the dll is not installed in the GAC. When I look at the manifest it has the dll as both a dependency of type "install", and type "prerequisite".

<dependency>
  <dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
    <assemblyIdentity name="TXml" version="1.0.0.0" publicKeyToken="565779B9F3980A62" language="neutral" processorArchitecture="msil" />
  </dependentAssembly>
</dependency>  
<dependency>
  <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="TXml.dll" size="6656">
    <assemblyIdentity name="TXml" version="1.0.0.0" publicKeyToken="C07302FBA7BB7B05" 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#sha256" />     <dsig:DigestValue>iI2aM7MMNzTPBWBCFhdSh9akFMtSNqw8HUItuXyf+xU=</dsig:DigestValue>
  </hash>
</dependentAssembly>

I'm wondering what in Visual Studio/ClickOnce decides that the dll is supposed to be a perquisite? It does not show up in the Application Files under the publish tab or properties. This same dll is referenced by other dlls that are also referenced in this project. Does it have something to do with that?

Issue is obviously the fact that it is expecting TXml to already be installed, but I don't know why. This has been working for months. The only change I can think is adding another dll that also has a reference to TXml

Dewey823
  • 133
  • 7

2 Answers2

0

This doesn't really answer the question, but it fixed my issue. I removed the references to both dlls, then added the reference to the TXml.dll first, then the reference to the other dll (that references TXml as well), and cleaned and published, and that worked. TXml no longer showed up as a prerequisite in the manifest.

Dewey823
  • 133
  • 7
0

I ran into a similar issue with NuGet packages this time. I had to remove one of the dependency (one of my internal Nuget package) that was using the dll targeted by the error message and add it back again.

In the manifest file, before my problem was fixed, I was experiencing a duplicate on the dll targeted by the error. The first one was asking for "preRequesite", and the second one was asking for "install". After, I was left only with the "install" one... Problem solved.