So, I inherited a project that seems to be using Spring.net extensively to do dependency injection. Every executable module implements a method where it goes to the Application config file for the given module and pulls a value along the lines of assembly://Config/Company.Protocol.Config/DIConfig.xml
with the middle bit of "Company.Protocol.Config" being slightly different for different executables, bearing a name similar, but not identical to, the project. That XML file seems to be contained within a Config
directory at the base of the solution holding the project. While I feel that things are a bit overcomplicated, I see what they're aiming for, storing references to various processing routines in that DIConfig.xml
file so that they can be injected.
The problem I'm running into is that I can't actually seem to navigate to those XML files with the specified path above, and my attempts to understand Spring.net don't seem to go far enough to understand where they plan to go with the "Assembly://" bit. I get a Could not resolve resource location
error. I've tried contacting the person who last worked with the code, but apparently they inherited it too, and have avoided messing with it for fear of breaking it.
I think that the intent of the line above is to go to the base of the assembly, then the Config directory or project, then get the DIConfig.xml
there, but when I try to use that, it can't find the file. I've tried removing the bit between Config
and DIConfig.xml
just in case this was a matter of there used to have been directories in between, but no dice. I can get it to "work" by dropping the DIConfig.xml file into the same location as the executable and changing the file to be read to simply "DIConfig.xml", thus in the same directory, but of course, that's not very extensible, particularly when I try to run the service that uses this.