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

前端 未结 3 524
栀梦
栀梦 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:01

    Ok. Basically, my mistake was linked to the fact that I added my IronPython assemblies from the wrong platform. Verify that:

    • Target Framework: 4.0

    • Add all the assemblies provided by IronPython in [IronPython-2.7.3]->[Platforms]->[Net40].

    Thx to everyone who gave me advices.

    Ps:Now, of course, there is another problem… But it's not about that topic anymore.

提交回复
热议问题