C# dynamic compilation and “Microsoft.CSharp.dll” error

前端 未结 3 489
栀梦
栀梦 2021-01-18 13:18

I\'m doing the example that can be found here. So I\'m trying to run IronPython in a C# script:

Python:

def hello(name):
    print \"Hello \" + name          


        
3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-18 14:05

    This is what helped me. I am using Xamarian Studio v5.8.1 (build 8) to write a C# program. I just had to right click "References" -> "Edit References" -> started typing "Microsoft" in the search bar -> Checked the box next to "Microsoft.CSharp" -> and clicked "OK".

    I just saved and ran the program after that - everything works as expected!

提交回复
热议问题