Jignesh
Jignesh

Reputation: 145

Run IronPython script with .netStandard 2.1 without any manual dependencies

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?

Upvotes: 2

Views: 555

Answers (1)

Simon Opelt
Simon Opelt

Reputation: 6211

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.

Upvotes: 1

Related Questions