|
We are creating a Software's extension dll. Here we will be using the Software's base dll which will be there in Software's Installed Location. But the extension dll will be installed inside a subfolder(Extensions) of the Software's Installed Location. In code i have added the Software's base dll reference and developed the code. Now what happens is the Software's base dll is copied inside the subfolder(Extensions) also which is not accepted. I should only take the Software's base dll from Software's Installed Location.
As the Software's Installed Location can be anything, how can i add dynamic reference to the Software's base dll. Please help.
|
|
|
|
|
Can you clarify with examples, where the various components of your application, are located. Also add the exact error messages you see.
e.g.
Development configuration (working)
===================================
App.exe
BaseDll.dll
ExtensionDll.dll
Deployment configuration (not working?)
======================================
App.exe
Extensions\BaseDll.dll
Extensions\ExtensionDll.dll
System.IO.FileNotFoundException: Could not load file or assembly 'BaseDll...........
I assume that whatever you had on the development machine works correctly. If the same relative paths are used in the deployed application does it still work?
|
|
|
|
|
Question as written is hard to understand.
Presumably you have a delivery that looks like the following
<root dir>\MyApp
App.exe
Base.dll
.\Extension\
Extended.dll
And you are loading Extended dll dynamically.
In that case Extended dll should be built using Base.dll.
There are two possibilities there.
1. You have already referred to something in App.exe which is in Base.dll. And thus Base.dll will already be loaded into the process (AppDomain) space
2. You have not referred to Base.dll. In that case the .Net load process will attempt to search for Base.dll. Presuming it is not in GAC then it will search in the App.exe directory and thus it will find it. And load it.
The above presumes you haven't messed with anything including setting up your own AppDomains.
|
|
|
|