Has the necessary .dll made it into the build-output of your main
project (usually under the "bin" folder)? Note that the compiler will
silently drop references that it detects aren't used by your code,
with the effect that it can get removed from the build-output.
Ensure "Copy Local" is set to true on the reference; if that doesn't
work, and the .dll is in your project-scope, then you can try changing
the build-action to "Component", or setting "Copy to Output Directory"
to true.
If the .dll is already there, then please indicate what are you
passing to Activator.CreateInstance()?
Marc
herbert422 - 21 Sep 2007 19:47 GMT
I tried the settings on the DLL files and it still could not find the
library. However, I included both the files in the resource.resx and
that seemed to have solved the issue of the library not being able to
resolve the missing library.
How I am calling the CreateInstance() method is passing in the type of
the construct. So the following:
Assembly myDLL = Assembly.LoadFile(path)
myObject = Activator.CreateInstance(myDLL.GetType("Namespace.MyClass")