Add exe to publish folder (ClickOnce) - Continue

Add-in Express™ Support Service
That's what is more important than anything else

Add exe to publish folder (ClickOnce) - Continue
 
nwein




Posts: 560
Joined: 2011-03-28
(This is a continuation of this post, I never got back to Sergey, sorry).

Steps to reproduce:
1. Open VS (2010 in my case)
2. Create new ADX XLL Add-in
3. Set it for Office 2010
4. In the project (MyXllAddin1) right cliekc and add a folder (solution explorer), call it Test
5. In a new VS create a simple winform application with nothing in it (i.e. only generated code), set the .NET framework to 4 for that project
6. Copy the exe from the previous step into the MyXllAddin1/test folder so it'll look something like this:

User added an image

7. Set the exe's build action as Content and copy Always
8. build your Xll Addin
9. the bin/debug would like something like that:

User added an image

10. Right click the project and click Publish (ClickOnce deployment). Make sure that the exe in its folder is included in the files
11. setup a network location and certificate and publish the project, copy the setup.exe along with the .application and folder (1.0.0.0) to the network location
12. attempt to install the add-in from the network location
13. observe the error

In this case the error is as follow (obfuscated network path):

PLATFORM VERSION INFO
Windows : 6.1.7601.65536 (Win32NT)
Common Language Runtime : 4.0.30319.269
System.Deployment.dll : 4.0.30319.1 (RTMRel.030319-0100)
clr.dll : 4.0.30319.269 (RTMGDR.030319-2600)
dfdll.dll : 4.0.30319.1 (RTMRel.030319-0100)
dfshim.dll : 4.0.31106.0 (Main.031106-0000)

SOURCES
Deployment url : file://blah/blah/blah//myxlladdin1.application
Deployment Provider url : file://blah/blah/blah/myxlladdin1.application
Application url : file://blah/blah/blah/1.0.0.0/MyXLLAddin1.exe.manifest

IDENTITIES
Deployment Identity : MyXLLAddin1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a6ab4cd18b531a49, processorArchitecture=x86
Application Identity : MyXLLAddin1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a6ab4cd18b531a49, processorArchitecture=x86, type=win32

APPLICATION SUMMARY
* Installable application.

ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of \\blach\blah\blah\blah\myxlladdin1.application resulted in exception. Following failure messages were detected:
+ Reference in the manifest does not match the identity of the downloaded assembly SampleForm.exe.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.

WARNINGS
There were no warnings during this operation.

OPERATION PROGRESS STATUS
* [4/12/2013 12:00:05 PM] : Activation of \\blach\blah\blah\blah\myxlladdin1.application has started.
* [4/12/2013 12:00:05 PM] : Processing of deployment manifest has successfully completed.
* [4/12/2013 12:00:05 PM] : Installation of the application has started.
* [4/12/2013 12:00:05 PM] : Processing of application manifest has successfully completed.
* [4/12/2013 12:00:07 PM] : Found compatible runtime version 4.0.30319.
* [4/12/2013 12:00:07 PM] : Request of trust and detection of platform is complete.

ERROR DETAILS
Following errors were detected during this operation.
* [4/12/2013 12:00:07 PM] System.Deployment.Application.InvalidDeploymentException (RefDefValidation)
- Reference in the manifest does not match the identity of the downloaded assembly SampleForm.exe.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.DownloadManager.ProcessDownloadedFile(Object sender, DownloadEventArgs e)
at System.Deployment.Application.FileDownloader.DownloadModifiedEventHandler.Invoke(Object sender, DownloadEventArgs e)
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
at System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
Posted 12 Apr, 2013 14:03:16 Top
Sergey Grischenko


Add-in Express team


Posts: 7224
Joined: 2004-07-05
Hi Nir,

Does the SampleForm.exe assembly have a strong name? Please check it in properties of the WinForm project.
Posted 15 Apr, 2013 05:40:07 Top
nwein




Posts: 560
Joined: 2011-03-28
Thanks Sergey (sorry about the delay in my initial response...)
It wasn't signed. I then signed the SampleForm project and re-added it to the add-in project but still getting an error when installing it:

PLATFORM VERSION INFO
Windows : 6.1.7601.65536 (Win32NT)
Common Language Runtime : 4.0.30319.269
System.Deployment.dll : 4.0.30319.1 (RTMRel.030319-0100)
clr.dll : 4.0.30319.269 (RTMGDR.030319-2600)
dfdll.dll : 4.0.30319.1 (RTMRel.030319-0100)
dfshim.dll : 4.0.31106.0 (Main.031106-0000)

SOURCES
Deployment url : file://blah/blah/blah/blah/myxlladdin1.application
Deployment Provider url : file://blah/blah/blah/blah/myxlladdin1.application
Application url : file://blah/blah/blah/blah/1.0.0.1/MyXLLAddin1.exe.manifest

IDENTITIES
Deployment Identity : MyXLLAddin1, Version=1.0.0.1, Culture=neutral, PublicKeyToken=0ca66bb4ddfbe32b, processorArchitecture=x86
Application Identity : MyXLLAddin1, Version=1.0.0.1, Culture=neutral, PublicKeyToken=0ca66bb4ddfbe32b, processorArchitecture=x86, type=win32

APPLICATION SUMMARY
* Installable application.

ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of \\blah\blah\blah\blah\myxlladdin1.application resulted in exception. Following failure messages were detected:
+ Reference in the manifest does not match the identity of the downloaded assembly SampleForm.exe.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.

WARNINGS
There were no warnings during this operation.

OPERATION PROGRESS STATUS
* [4/15/2013 8:11:20 AM] : Activation of \\blah\blah\blah\blah\myxlladdin1.application has started.
* [4/15/2013 8:11:20 AM] : Processing of deployment manifest has successfully completed.
* [4/15/2013 8:11:20 AM] : Installation of the application has started.
* [4/15/2013 8:11:20 AM] : Processing of application manifest has successfully completed.
* [4/15/2013 8:11:22 AM] : Found compatible runtime version 4.0.30319.
* [4/15/2013 8:11:22 AM] : Request of trust and detection of platform is complete.

ERROR DETAILS
Following errors were detected during this operation.
* [4/15/2013 8:11:23 AM] System.Deployment.Application.InvalidDeploymentException (RefDefValidation)
- Reference in the manifest does not match the identity of the downloaded assembly SampleForm.exe.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.DownloadManager.ProcessDownloadedFile(Object sender, DownloadEventArgs e)
at System.Deployment.Application.FileDownloader.DownloadModifiedEventHandler.Invoke(Object sender, DownloadEventArgs e)
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
at System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
Posted 15 Apr, 2013 10:14:29 Top
Sergey Grischenko


Add-in Express team


Posts: 7224
Joined: 2004-07-05
Nir, did you re-populate files in the Publish wizard?
Posted 15 Apr, 2013 10:30:14 Top
Sergey Grischenko


Add-in Express team


Posts: 7224
Joined: 2004-07-05
Also, please try to delete the 'Publish' directory in your project and publish the project again.
Posted 15 Apr, 2013 10:31:36 Top
nwein




Posts: 560
Joined: 2011-03-28
Yes, I did all that (you can even see I've incremented the addin version so the output is 1.0.0.1 and not 1.0.0.0 as before, but I've also deleted the entire publish folder beforehand). Are you able to install the add-in (following the steps I've provided) without a problem?
Posted 15 Apr, 2013 10:33:20 Top
Sergey Grischenko


Add-in Express team


Posts: 7224
Joined: 2004-07-05
Hi Nir,

I managed to reproduce the issue. To fix it please open the Security tab of the Properties dialog in the Windows Application project and enable the 'Enable ClickOnce security settings' option. Then you need to re-build the win app project and re-publish the XLL add-in.
Posted 15 Apr, 2013 11:52:29 Top
nwein




Posts: 560
Joined: 2011-03-28
It works perfectly. Such a simple solution.
Thank you so much Sergey!
Posted 15 Apr, 2013 12:00:18 Top