Deployement manifest with Post Deployement Action issue with LexActivator.dll

Hello,

I have been struggling with this for a while and I am running out of ideas… so I have decided to ask for your help!

I made a VSTO application. I cannot add LexActivator.dll and LexActivator64.dll as reference as I get an error message stating that these are not valid assemblies or COM components. Fair enough, I added them as data files to the project with build action “content” and copy to output directory “always”.

When publishing with Visual Studio 2015 everything works like a charm. The application installs properly without any issue on client computers. I can use Cryptlex and activate my product without any issues.

The manifest looks like this:

uS1GU0lCDwFWtlvGhEMQyTXnJCQ4EZOFNfKMGh4v5hI= gkQEioLgyK9c4ykkV4qM5rjeQq/2oCfJJwVjOv4kgog=

The thing is that I want to copy additional files during deployment or maybe just run a bit of code with a form, I never reached that point anyway so this is not important at this stage. I followed this procedure (https://msdn.microsoft.com/en-us/library/office/ff961899(v=office.14).aspx) and added the following xml to my manifest:

vstav3:postActions
vstav3:postAction
<vstav3:entryPoint class=“PostDeploymentAction.PostDeploymentAction”>

</vstav3:entryPoint>
vstav3:postActionData
</vstav3:postActionData>
</vstav3:postAction>
</vstav3:postActions>

Then I re-sign my deployment manifest and my application manifest with some mage.exe command lines.

When I run the setup on the client computer I get the following error:

“There was an error during installation.”

System.BadImageFormatException: Could not load file or assembly ‘file:///C:\Users\ico\AppData\Local\Apps\2.0\MQ9PK6G1.CPA\VX5YPVPN.LB3
zrb…vsto_6f3973f70f377867_0000.0003_5e8192b4f3158394\LexActivator.dll’ or one of its dependencies. The module was expected to contain an assembly manifest.

Indeed in that folder there are no manifests for those files unlike the other ones but the thing is that if I look into that folder when I don’t include my Post Deployment xml into my manifest, there are no manifest either… So I can assume these files are not supposed to have manifests anyway.

I have tried to completely remove the references to those files in the manifest. The VSTO installs correctly and my post deployment action message box pops-up. When I run the app then of course it crashed cause the two dlls are missing. If I add them manually into the deployment folder, ClickOnce is not fooled and displays the same error message: “The module was expected to contain an assembly manifest.”

I also tried to force it to recognize the files as data with adding this to the manifest:

The files were not copied to the deployment folder so I had to copy them manually but same error message when I run the app.

To sum up, everything works fine with those dll without Post Deployment Action. If I add PDA to the manifest and re-sign it, ClickOnce flags those dll as dependencies instead of data files and then look for a manifest which does not exist… Any ideas what I should try next?

Thank you for your help.

Hi,

Lexactivator has dependency of VS2010 runtime dlls, try including them in the same folder as Lexactivator dll

You can download them from following urls:

https://s3.amazonaws.com/dl.cryptlex.com/downloads/native/vs2010/vs2010_x86.zip

https://s3.amazonaws.com/dl.cryptlex.com/downloads/native/vs2010/vs2010_x64.zip

Or you can install the runtime on the target machines if not present (recommend):

https://www.microsoft.com/en-us/download/details.aspx?id=13523

https://www.microsoft.com/en-us/download/details.aspx?id=8328

Maybe it’s actually complaining about these dlls.

adnan,

Sorry for the late reply it has been a busy week… I have tried both options and none worked.
I made a very light test project to be sure nothing interferes.
You can find it here: https://1drv.ms/u/s!AgR8q_ERUOFOhjyGjWFjJ8r5ziDJ

Any ideas what I should try next?

Thanks!

Hi,

Did you try out the following:

It seems you are deploying Debug version instead of Release version?

I finally took some time to look into that again… I wasted so much time on it that I was kind of reluctant to spend more on it…

I have tried changing platform and or target framework but no luck. I also made sure I work on the publish folder but same issue.

The good news is it is not a problem related to lexactivator.dll as I have tried with other non COM libraries and I get the same problem. Actually, in a mock up project. Adding the VS2010 runtime libraries without adding lexactivator.dll throws the same kind of error.
I can conclude the following:
ClickOnce + VSTO + non COM libraries = OK
ClickOnce + VSTO + Post Deployment Actions + non COM libraries = not OK

I will ask on more general forums as it is in fact not related to you guys.

Thanks!

Hi,
My name is Emily, a while back i have started to get this message about missing binkw32-dll, I binkw32-dll not found on web but its confusing what to do next,
Can someone help,
Best Regards,
(Emily lee)

Hi Emily,

Lexactivator or Lexfloatclient doesn’t have any dependency on this library.

Regards,
Adnan