clickonce publish fails due to missing dependency

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

clickonce publish fails due to missing dependency
referenced assembly is in sub-folder 
aweber




Posts: 83
Joined: 2013-11-21
We are trying to publish an update to our addin that supports 64bit office.

We have to leverage "GeckoFX" (firefox) to support a browser-page, and have been deploying their native dll's in a sub folder of the addin. The actual .net assembly has been in the output/bin directory and has been published properly in the past.

The native binaries for 64bit are necessarily different, and the .net assembly is slightly different too.

In order to prevent the addin from loading the 32bit assembly on a 64bit host, we have moved both "bitness" assemblies into sub-folders ("Firefox" and "Firefox64"), and plan to publish and deploy in that structure. We now catch the Assembly Resolve (miss) when we need that component and automatically pick the correct bitness assembly from the sub-directory, and load it from there. Works great in testing.

We can not put either of the assemblies in the default output directory, because .Net resolves the assembly and tries to load it before we can catch that event and do the work ourselves. So the Referenced assembly's "Copy Local" is set to FALSE.

It appears that when we try to "Populate" the publish output, ADX looks for the referenced assembly, and when it can not find it it fails to populate our publish directory. This shows-up as an error, though it probably should be a warning or have some note to say how to force ignore that. The assembly will be available on the client PC, because we are publishing it in a sub-folder, and we are resolving it ourselves.

But we currently can not publish our project, because we do not know how to tell the ADX publish (VS) add-in to ignore this error/warning. Can you please tell me if there is a workaround to tell the publish/populate to ignore specific assemblies?

Thank you,
AJ

PS: A similar project in our solution that is a more traditional binary - but we are using the same methodology to reference the assemblies - publishes correctly with the default/standard Visual Studio ClickOnce publish.
Posted 22 May, 2018 12:19:49 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello AJ,

This scenario isn't supported by ClickOnce: all dependencies are required when you publish your add-in because their metadata are used to create the manifest. The only way out is MSI+ClickTwice.


Andrei Smolin
Add-in Express Team Leader
Posted 23 May, 2018 08:45:07 Top
aweber




Posts: 83
Joined: 2013-11-21
But the dependencies ARE included. They are in the sub folders that are to be published.

Furthermore, these assemblies are included in the project "References" correctly and are found by the paths in their properties.

Thus, the project information regarding dependencies is correct and functional. It appears that ADX's publish does not use the information available in the project file. To me, that is a bug.
Posted 23 May, 2018 09:03:39 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
AJ,

ADXPublisher doesn't use the project at all. It scans the folder instead. There are two possibilities: 1) the error is raised by the .NET infrastructure; we can't do anything in this case; 2) the error is raised by our code. We need to reproduce the issue. could you please help us with this?


Andrei Smolin
Add-in Express Team Leader
Posted 23 May, 2018 10:37:39 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello AJ,

We've reproduced the issue. We will try to suppress the exception in your case. Tomorrow, we will send you some files fixing the issue. What Add-in Express version are you using? What VS version are you using?


Andrei Smolin
Add-in Express Team Leader
Posted 23 May, 2018 11:35:01 Top
aweber




Posts: 83
Joined: 2013-11-21
I'm running ADX 8.7.4425 in Visual Studio 2015 Pro.

Look forward to the update!!! :)
Posted 23 May, 2018 12:10:02 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello AJ,

I've sent you an email with a download link and instruction. Please let me know if the fix works for you.


Andrei Smolin
Add-in Express Team Leader
Posted 24 May, 2018 05:56:46 Top
aweber




Posts: 83
Joined: 2013-11-21
The supplied patch seems to work great!

Great work and quickly fixed. Thank you.

Can you ask the development team to put the patch fixes into the future product builds?

Thanks again!
-AJ
Posted 24 May, 2018 10:34:07 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Thank you for confirming!

It will be included.


Andrei Smolin
Add-in Express Team Leader
Posted 25 May, 2018 03:21:02 Top