IronLanguages / ironpython2

Implementation of the Python programming language for .NET Framework; built on top of the Dynamic Language Runtime (DLR).
http://ironpython.net
Apache License 2.0
1.08k stars 229 forks source link

Unable to load IronPython assembly while running a .NETCore2.1 Console App on VS2019 #642

Closed Wizard2436829 closed 3 years ago

Wizard2436829 commented 5 years ago

So I am trying to run a python script from my .NET Core App.

When the method that involves functions and classes, that are included in the IronPython Library, is invoked, it gives me the following error message :

Could not load file or assembly 'IronPython, Version=2.7.9.0, Culture=neutral, PublicKeyToken=7f709c5b713576e1'. An operation is not legal in the current state. (Exception from HRESULT: 0x80131509)

I had installed the IRON Python library for .NET using the Nuget Package Manager. Also, the present version of python installed in my system is 3.7.3

Can you please provide a solution.

Thanks in advance

slozier commented 5 years ago

Could you provide an example to reproduce the issue?