IronLanguages / IronLanguages/ironpython3

v3: Embedding in a web site - build warnings about WindowsBase

Open
#1,801 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
2.8k
Forks
316
Avg merge
1d 9h
Merged PRs (30d)
1

Description

Description

I'm working on a legacy site and was going to upgrade IronPython to 3.4.1 (from 2.7), via nuget, and came cross build warnings in every project downstream from the one consuming ironpython - conflicts between WindowsBase 4.0 (IronPython dependency afaik) and WindowsBase 6.0 (dotnet system library)

Downgrading back to 2.7 sorts out the issue (and, in retrospect, it's probably what I want, considering language changes between python 2 and python 3), but it seems to be as if embedding IronPython in anything other than a windows GUI app isn't fully supported - I shouldn't need wpf dlls in my deployment, especially as it's being shipped off to a linux container.

Is this intentional? Is there a different package I should use?

Steps to Reproduce
  1. create an asp.net website
  2. create a class library project which depends on ironpython and make the asp.net website depend on that
  3. build - this is when I see warnings

I've tried explicitly installing ironpython in the projects where the warning is emitted and that doesn't help. I'm reticent to apply assembly rebinds on a major version difference.

Expected behavior:

Should just build without requiring windows libraries

Actual behavior:

It seems like IronPython has a fairly hard dependency on WPF components (IronPython.Wpf.dll) which may make a lot of sense for GUI embedding, but makes little sense for, eg, a rules engine running in a service or website, and seems to tie the application to a win32 environment (but I'm not 100% sure - I backed out before attempting to break all the things 😅 )

  • problematic package: IronPython-3.4.1
  • .NET platform used: net8.0
  • Operating system used: windows (but the deployment target is linux)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the described ASP.NET website and class library setup with IronPython-3.4.1 on net8.0, then inspect the downstream build warnings and package dependencies. Compare the resulting WindowsBase and IronPython.Wpf references with the expected deployment target; done means either a build without unnecessary Windows libraries or a clearly documented package limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.