CSharpScript.EvaluateAsync: Doesn't find Xml namespace – why? #77411
-
I tried this very simple test: private void Test(string input)
{
ScriptOptions options = ScriptOptions
.Default
.WithImports("System", "System.Xml", "System.Xml.Linq")
.WithReferences("netstandard.dll", "System.dll", "System.Xml.dll", "System.Linq.dll", "System.Xml.Linq.dll" , "System.Core.dll")
;
Task<object> t = CSharpScript.EvaluateAsync<object>(input);
} As far as I can tell, all necessary imports and references are included. However, when I write:
And if I write:
How come? |
Beta Was this translation helpful? Give feedback.
Answered by
huoyaoyuan
Mar 5, 2025
Replies: 1 comment 1 reply
-
After debugging back and forward, I realized your |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
SetTrend
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After debugging back and forward, I realized your
ScriptOptions
is not passed intoCSharpScript.EvaluateAsync
at all. Passing it works fine.