S
Shannon Lloyd
Hi,
We have an application with a main form which loads an indeterminate
number of dlls from a local directory at runtime via Assembly.LoadFrom
and stores references to them in a Hashtable - sort of a pluggable
module scenario. Under normal circumstances this all works fine, but
we've noticed that if the assemblies are rebuilt (without also
rebuilding the base application) and then the application is run, we get
NullReferenceExceptions in the main form at the point where the
assemblies are loaded. This makes me wonder if there is something going
on with dll versioning...? Both the main application and the
dynamically-loaded assemblies reference a number of "common" utility
dlls which we have also created. All references to these dlls have been
marked in VS .Net 2003 as Copy Local = false to avoid different
copies/versions of these shared dlls being built whenever the main app
or the dynamically-loaded assemblies are rebuilt.
In short, if I do a complete rebuild on the entire solution, everything
works perfectly, but if I come back the following morning and rebuild
just one of the assemblies, the main application won't load it at
runtime. Obviously we would like to be able to update our clients'
handhelds by just giving them the updated assemblies, rather than having
to reinstall the entire application every time we modify a single method.
Any ideas what we are doing wrong?
Thanks,
Shannon
We have an application with a main form which loads an indeterminate
number of dlls from a local directory at runtime via Assembly.LoadFrom
and stores references to them in a Hashtable - sort of a pluggable
module scenario. Under normal circumstances this all works fine, but
we've noticed that if the assemblies are rebuilt (without also
rebuilding the base application) and then the application is run, we get
NullReferenceExceptions in the main form at the point where the
assemblies are loaded. This makes me wonder if there is something going
on with dll versioning...? Both the main application and the
dynamically-loaded assemblies reference a number of "common" utility
dlls which we have also created. All references to these dlls have been
marked in VS .Net 2003 as Copy Local = false to avoid different
copies/versions of these shared dlls being built whenever the main app
or the dynamically-loaded assemblies are rebuilt.
In short, if I do a complete rebuild on the entire solution, everything
works perfectly, but if I come back the following morning and rebuild
just one of the assemblies, the main application won't load it at
runtime. Obviously we would like to be able to update our clients'
handhelds by just giving them the updated assemblies, rather than having
to reinstall the entire application every time we modify a single method.
Any ideas what we are doing wrong?
Thanks,
Shannon