Using External dll's that can't be packed with my software

%3CLINGO-SUB%20id%3D%22lingo-sub-3045956%22%20slang%3D%22en-US%22%3EUsing%20External%20dll's%20that%20can't%20be%20packed%20with%20my%20software%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3045956%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20problem%20I'm%20having%20is%20with%20unrecognized%20dll%20paths%20when%20using%20MSIX%20runtime.%3C%2FP%3E%3CP%3EOur%20SW%20communicates%20with%20external%20dll's%20that%20reside%20in%20the%20%60%3CEM%3EC%3A%2FTwinCat%60%26nbsp%3B%3C%2FEM%3Edirectory.%20These%20dll's%20are%20external%20and%20are%20used%20to%20communicate%20with%20our%20hardware.%20They%20are%20part%20of%20an%20external%20software%20called%20TwinCat.%26nbsp%3BWhen%20we%20try%20to%20connect%20our%20SW%20to%20the%20HW%20we%20use%20these%20dll's%20for%20communication.%3C%2FP%3E%3CP%3EThe%20problem%20is%20that%20when%20the%20SW%20runs%20in%20MSIX%20virtual%20environment%20it%20can't%20find%20the%20paths%20of%20the%20relevant%20dll's%2C%20but%20when%20I%20run%20everything%20locally%20(when%20debugging)%20everything%20works%20perfectly.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20using%20the%26nbsp%3B%3CSTRONG%3EPackage%20Support%20Framework%26nbsp%3B%3C%2FSTRONG%3Ebut%20had%20no%20success.%20I%20get%20the%20following%20error%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EADS%20could%20not%20be%20initialized%20because%20the%20'TcAdsDll.dll'%20is%20not%20found!%20Please%20check%20DLL%20search%20paths!%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20anybody%20please%20help%3F%20If%20we%20won't%20be%20able%20to%20fix%20this%20issue%20we%20will%20have%20to%20abandon%20MSIX.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance!%3C%2FP%3E%3CP%3EMichael%20Pesin.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Regular Visitor

Hello,

 

The problem I'm having is with unrecognized dll paths when using MSIX runtime.

Our SW communicates with external dll's that reside in the `C:/TwinCat` directory. These dll's are external and are used to communicate with our hardware. They are part of an external software called TwinCat. When we try to connect our SW to the HW we use these dll's for communication.

The problem is that when the SW runs in MSIX virtual environment it can't find the paths of the relevant dll's, but when I run everything locally (when debugging) everything works perfectly. 

I tried using the Package Support Framework but had no success. I get the following error:

 

ADS could not be initialized because the 'TcAdsDll.dll' is not found! Please check DLL search paths!

 

 

Can anybody please help? If we won't be able to fix this issue we will have to abandon MSIX.

 

EDIT:

The path to the dll's is saved in the win environment variables in PATH. 

 

Thanks in advance!

Michael Pesin.

2 Replies
Hi Michael,

If the dll is present in C:/TwinCat, I believe the packaged app should be able to see it. I am dropping you a message for more details.
Sorry, not here to offer a solution but rather to add my name to the list of folks that need this. I'm trying to package up a 3rd party component, which we are allowed to distribute, that, in turn, talks with another 3rd party component that we can't distribute (ergo can't package) due to licensing issues (customers acquire it from the vendor). The component I'm packaging seems to rely on the PATH variable to find the next level of 3rd party components, and because MSIX doesn't look at the path this dynamic loading doesn't work.

Unless I'm missing something, there's nothing available to affect the DLL search paths in an MSIX-packaged application beyond redirecting stuff *inside* the container, i.e. no equivalent to PATH/AppPath, so this component can't be packaged without code changes by the 3rd party.

This same issue also stops me from interacting with TWAIN data-sources from inside an MSIX-packaged application (vendor's data-sources often rely on the 'normal' DLL search paths, and there's no way I can package every possible data-source and its dependencies that a customer might want to use).

Being able to specify additional DLL search paths *located outside the container* in the manifest or something would be really useful. I know it goes against the self-contained principle of MSIX, but there has to be some kind of compromise, right? This kind of thing will be a blocker for a bunch of apps/libraries where the package owner isn't the code owner.