Hi Kevin
Thanks for you intrest.
Things have moved on a little since I first posted.
I have managed to get my application to load assemblies dynamically
using CreateInstanceAndUnwrap if the assembly is found using probing,
i.e it is in the same folder as my calling application.
However if I move it and use CreateInstanceFromAndUnwrap I get a
SearilizationException saying the assemblie cannot be found.
I know the assemby is OK because I have no trouble loading it in the
same AppDomain, the trouble only occurs if I create a new AppDomain
and try to use CreateInstanceFromAndUnwrap to load it into the new
AppDomain.
Do I need to set up access permissions?
The problem is I am running the code from a Excel addin, so when I
create the new Appdomain it has a basedirectory of "c:\Program
File\Microsoft Office\Office". If I placed my assembly to be loaded in
the "\Office" directory it works, but I do not want to do this, I want
to be able to place it where I want. I have tried creating the new
AppDomain with a specific BaseDirectory but this does not work either.
I have search high and low for the answer but can find any vb.net
examples. I am not to faililiar with security permissions so not sure
if these are an issue.
Regards
Tim
On Sat, 19 Nov 2005 05:00:51 GMT,
v-****@online.microsoft.com (Kevin
Yu [MSFT]) wrote:
Hi Tim,
Is there any circular dependencies in the type ImportWS in your assembly?
If yes, Please do not use circular dependencies. If that still doesn't
help, could you attach the whole reflection code and the simple assembly
code that can reproduce the problem in your post? Also which version of
VS.NET are you using?
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."