Hi,
We have to compile and use around ten .cs scripts when our application start. So we use with success this line code :
CSScript.LoadWithConfig(csScript, dllFile, false, cssSettings, "")
We can execute scripts methods without errors.
Now, because scripts don't change often and to avoid long compile time at application start, we tried to load previously generated dll files.
We manage to load it in assemblies like this for each dll files :
byte[] b = File.ReadAllBytes(dllFile);
ass = Assembly.Load(b);
But when we tried to execute methods loaded, with the same code than the first case, we got a general exception 'Exception raised by target' (translated from french, sorry)
The call of our methods :
the_methodname.Invoke("methodName", params);
Anyone has an idea ?
Thanks in advance.