2

I have created one py script which imports my .netStandard classLibrary and runs its execution

The issue is, when my class library .netStandard version is 2.0 or less it runs properly, But if the version is .netStandard 2.1 it asks for netStandard.dll as not found.

Now i have copied the .netStandard file from 'C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App\3.1.5' location and pasted with the Py script location and now it ran successfully.

I don't understand why specifically with .netStandard v2.1 the DLR with Iron python does not detect the netStandards dll. or are there are any steps i am missing?

Jignesh
  • 125
  • 8
  • Could you please provide more detail on how you are driving your ironpython execution? Embedded in something? Through ipy.exe? – Simon Opelt Jan 15 '21 at 06:42
  • Yes @SimonOpelt, I have downloaded ipy version 2.7.11 and using ipy.exe. I am running on command line like this: 'ipy runnableScript.py' – Jignesh Jan 15 '21 at 08:19

1 Answers1

1

When installing through the MSI package, ipy.exe is a dotnet 4.x application and therefore only compatible with dotnet standard up to version 2.0 as documented here.

If you execute your python code hosted from within a dotnet core 3.x or dotnet 5 application (using the NuGet package) you will be able to execute it.

As discussed here IronPython is not shipping an ipy.exe using dotnet core 3.x/dotnet 5 right now but using the ZIP-distributon you can dotnet ipy.dll (see netcoreapp3.1 folder) or use the dotnet core 2.1 ipy.bat to launch your code.

Simon Opelt
  • 6,136
  • 2
  • 35
  • 66
  • I understand this, but was having one confusion. Check this git release link : 'https://github.com/IronLanguages/ironpython2/releases/tag/ipy-2.7.10'. here they have wrote 'This release adds .NET Core 3.1 support.' and check this link : 'https://ironpython.net/download/'. here they have mentioned 'IronPython also runs on .NET Core 2.0 and 2.1.' So my doubt is can i call a dll with .net core 3.1 from ipy script? – Jignesh Jan 19 '21 at 04:44