Detecting and loading a non-redistributable dll at run time
Last Updated Apr 11, 2014 — Enterprise Agile Planning expert
Enterprise Agile Planning
Scenario: We have a solution that depends on different versions of a non-redistributable dll, so until now we have created building rules that we use when we want to build against this dll. We have a folder per dll and we have to pick the correct one for the environment that we want to setup. Question: Can we figure out what is the correct version of the dll installed in the environment and load it programmatically? Yes, we can do that! It’s a solution that isn’t pretty but it gets the job done!
First of all, we’ve to declare explicitly what are the assemblies we support for the solution
Recap: So if the environment where you want to run the application has the same version of the dll that the solution compiled has it will work without needing to do anything else. In the case that the environment has another version of the dll installed (e.g a major version) , when the application runs, it will make use of the loop in the code trying to load the correct dll by itself.
PI Planning aims to bring together all the people doing the work and empower them to plan, estimate, innovate, and commit to work that aligns with the business’s high-level goals, vision, and strategy.
Silvia Davis, Sr. Product Marketing Manager at Digital.ai, tells her story of how a positive app experience led to the realization that proper data integration is essential to the entire application lifecycle.
Regardless of where you are on your digital transformation journey, we can help you achieve your strategic outcomes and accelerate value delivery with the right combination of technology, services, and training.