0

When using CSScript.Evaluator.Reset(), will this reset anyone else that is currently using the same script or build?

Another way of asking my question. script = CSScript.Evaluator.LoadCode(scriptString); If another user came thru and called the same code, but an error occurred. Would the original compile still be good and safe?

Also CSScript.Evaluator.AutoResetEvaluatorOnError = true, this does not seem to be working. After i cause an error in the code, then fix it. The compile will not work til i reset my app, or use Reset().

Using Reset is working, But that's the reason for my initial question.

I am using CSScript.Evaluator.LoadCode and looking at CSScript.Evaluator.LoadMethod, but getting the same issues.

These are not huge scripts, but may run in large batches or loops. Not against unique naming, cause i will have build for every run anyway. But i'm not sure the cache is working either.

Where is the location of the cache folder, when CSScript.CacheEnabled is enabled?

Yogurt The Wise
  • 4,379
  • 4
  • 34
  • 42

1 Answers1

1

Would the original compile still be good and safe?

Yes it would as when you hold the reference to the compiled object it is YOURS. I is good even if you destroy the compiler.

Also CSScript.Evaluator.AutoResetEvaluatorOnError = true, this does not seem to be working.

This setting triggers so cold SoftReset, which is different to the Reset only by re-referencing the assemblies and re-creating the CompilerSettings object. It the time of the initial implementation SoftReset was sufficient to fully clear Mono.Evaluator. I will need to check may be it is not the case any more. I will let you know the outcome.

Where is the location of the cache folder, when CSScript.CacheEnabled is enabled?

The caching doesn't cover Mono Evaluator as the all assemblies are in the memory and cannot be cached. Everything that is accessed through CSScript.Evaluator.* applicable to the Mono compiler and everything that it accessed through CSScript.* is a CodeDOM compiler, which indeed implements caching mechanism.

user3032112
  • 141
  • 3