> Thanks for your reply
>
[quoted text clipped - 3 lines]
> which is what I am trying to avoid
> as you can not unload dot net DLL
You could do it in another AppDomain, and marshal the array across, no?
That way, you can unload the other AppDomain and the assemblies in it.
-- Barry

Signature
http://barrkel.blogspot.com/
John Rivers - 15 Mar 2007 08:43 GMT
That is a very good idea *-)
At last my scripting engine will work ...
- pass Source code to method in DLL in new AppDomain
- method compiles and returns IL bytecode as byte[]
- Unload AppDomain
- create DynamicMethod with returned bytecode
Thanks Barry
> > Thanks for your reply
>
[quoted text clipped - 11 lines]
>
> --http://barrkel.blogspot.com/
John Rivers - 15 Mar 2007 18:28 GMT
Hi Barry
I have written the scripting engine as you suggested.
And that approach is working fine
Now I am getting stuck problems such as:
"Common Language Runtime detected an invalid program."
"Bad method token."
I have success with methods such as:
public void Test() {
}//method
and this one worked temporarily:
public int Test() {
return 3;
}//method
but not with such exotic methods as:
public string Test(string a, string b) {
return a + b;
}//method
this one is interesting:
public string Test() {
return "hello";
}//method
the string literal is not included in the method body IL
so that can never work ...
and some signature problems solved with:
SignatureHelper sh = SignatureHelper.GetLocalVarSigHelper();
dii.SetLocalSignature(sh.GetSignature());
I am getting the impression that the IL has to be "rebound" a bit like
rebasing a DLL
Have you had any success?
John
> That is a very good idea *-)
>
[quoted text clipped - 24 lines]
>
> - Show quoted text -