multiple vault extensions sharing dlls

multiple vault extensions sharing dlls

Anonymous
Not applicable
345 Views
0 Replies
Message 1 of 1

multiple vault extensions sharing dlls

Anonymous
Not applicable

Over the past 8 years or so I have written multiple Vault extensions in C# .NET.  For the most part they have worked out quite well for us.  However as I keep expanding my library of extensions, I am running into more issues every year when I need to upgrade the references and API version numbers to work with the current Vault releases.

 

I am a totally self taught programmer,  and have no formal training in managing large projects.  I have no doubt used some 'wrong' programming practices over the years so my problems are likely self inflicted, but if somebody has some advice for me I would be grateful.

 

Most of my extensions consist of multiple dlls.  For example I have a JobProcessorPrintPDF extension which in addition to the main JobProcessorPrintPDF.dll, also depends on a PrintPDF.dll.  This is fine, I just copy both dlls into the %programdata%\Vaultxxxx\Extensions\ExtensionName folder, and everything loads fine. 

 

The problems start when I have another extension, called 'Direct View'.  It also references the PrintPDF.dll.  In the past I have been careful to only copy the 'PrintPDF.dll' into one of the extension folders because I have run into issues when I did an update to the 'PrintPDF.dll' code, I forgot to update it in both folders, and nearly pulled out all my hair before I figured out why my changes wouldn't apply.  Because it was loading the 'out of date' dll first and ignoring the other one I guess.

 

The problems multiply when this 'PrintPDF.dll' depends on a config file that i've told it to find in the folder where it's executing from like so.

 

var configFileDirectory = new DirectoryInfo(System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
                var configFile = new FileInfo(configFileDirectory.FullName + "\\log4net.config");

Right now this config file is not loading from the same folder as the 'PrintPDF' dll so I'm getting kind of confused.

 

As mentioned before, my structure is likely all wrong, but if anybody else has run into similar issues with multiple dlls, I would be interested in hearing what for structure you use to keep everything organized and clean.  Thanks.

0 Likes
346 Views
0 Replies
Replies (0)