Program Not Using DLL In directory in System Path

193 Views Asked by At

I have a Click Once Deployment program that our office uses. 1.5MB of it is actual program. The rest is static DLL's like EPPlus and PDFSharp. I have a few others totaling about 7MB and I'm getting ready to use SyncFusion's Libraries which are 154MB in size.

I decided that I should leave these DLL files out of the Deployment and instead install them to the systems in question. I'm using Inno with modpath.iss to install these.

[Setup]
AppId={{6485E93B-75FC-4613-AFB7-A1800B986F7D}}
AppName="Required DLL Files"
AppVersion="1.0"
DefaultDirName="{pf}\FE Libraries"
OutputBaseFilename="Required DLL Files.exe"
Compression=lzma2/ultra64
SolidCompression=yes    
ChangesEnvironment=true

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Files]
Source: "Files\*"; DestDir: "{app}"; Flags: "deleteafterinstall"

[Tasks]
Name: modifypath; Description: &Add application directory to your environmental path; Flags: unchecked

[Code]
const
    ModPathName = 'modifypath';
    ModPathType = 'system';

function ModPathDir(): TArrayOfString;
begin
    setArrayLength(Result, 2)
    Result[0] := ExpandConstant('{app}');   
end;
#include "modpath.iss"

The files are installed to the correct location, and the Path is added to System Environmental.

Location

c:\Program Files (x86)\WOTC-FE Libraries

Path String

c:\Program Files (x86)\WOTC-FE Libraries

And this is an x86 compiled application.

However, the program won't run any functions requiring these DLL files. I get errors that state that the registered DLL file isn't installed.

System.IO.FileNotFoundException: Could not load file or assembly 'EPPlus, Version=4.0.5.0, Culture=neutral, PublicKeyToken=ea159fdaa78159a1' or one of its dependencies. The system cannot find the file specified.
File name: 'EPPlus, Version=4.0.5.0, Culture=neutral, PublicKeyToken=ea159fdaa78159a1'

So am I missing something?

0

There are 0 best solutions below