How to execute script with xamarin forms on android

不羁岁月 提交于 2019-12-10 18:22:31

问题


I'm trying to run a C # script using Xamarin Forms on Android Mono. When I run the script I get the error: System.IO.FileNotFoundException: Could not find file "/mscorlib.dll"

Here is the code I am trying to execute:

object result;
var script = CSharpScript.Create("DateTime.Today.Year",ScriptOptions.Default.WithImports("System"));
script.RunAsync().ContinueWith(s => result = s.Result).Wait();

来源:https://stackoverflow.com/questions/51212599/how-to-execute-script-with-xamarin-forms-on-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!