Title: FR: Port Install-IronPython and Implement Direct PowerShell Support · Issue #2601 · pythonnet/pythonnet · GitHub
Open Graph Title: FR: Port Install-IronPython and Implement Direct PowerShell Support · Issue #2601 · pythonnet/pythonnet
X Title: FR: Port Install-IronPython and Implement Direct PowerShell Support · Issue #2601 · pythonnet/pythonnet
Description: SHILL DISCLAIMER: The reddit links are to my posts. Not trying to farm. I just don't know of anyone else who has already started work on this. Background A little known fact about PowerShell is that it too is also a CLR language just lik...
Open Graph Description: SHILL DISCLAIMER: The reddit links are to my posts. Not trying to farm. I just don't know of anyone else who has already started work on this. Background A little known fact about PowerShell is tha...
X Description: SHILL DISCLAIMER: The reddit links are to my posts. Not trying to farm. I just don't know of anyone else who has already started work on this. Background A little known fact about PowerShell is...
Opengraph URL: https://github.com/pythonnet/pythonnet/issues/2601
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"FR: Port Install-IronPython and Implement Direct PowerShell Support","articleBody":"**SHILL DISCLAIMER:** The reddit links are to my posts. Not trying to farm. I just don't know of anyone else who has already started work on this.\n\n# Background\n\nA little known fact about PowerShell is that it too is also a CLR language just like C#. This means that .dll libraries written for C# can also be used in PowerShell.\n\nIronPython currently takes advantage of this to make Python APIs available directly in PowerShell:\n- README: https://github.com/IronLanguages/ironpython3?tab=readme-ov-file#Installation\n- usage guide: https://www.reddit.com/r/PowerShell/comments/1luv01h/comment/n24bglu/?context=3\n\n# C# vs PowerShell and Applicability to Python.NET\n\nOne of the major differences between the 2 languages is how .nupkgs are treated. PowerShell expects them to be PowerShell modules and not bundled C# libraries. Natively, PowerShell doesn't know how to parse and handle .nupkgs pulled from NuGet. It's only designed to handle the ones provided by PowerShell Gallery.\n\nThis means that using the existing .nupkgs built for NuGet won't be usable out of the box. There are 2 options for implementing:\n\n## _Utilize IronPython's Existing Solution (Recommended)_\n\nIronPython builds and ships a separate .zip archive to be used by `ipy` and `powershell` for easy embedding. You could just port this practice over the way it is. This method is also well-maintained\n\n**For more on how this method would be utilized, you can read about it here:**\n- setup and usage guide: https://www.reddit.com/r/PowerShell/comments/1luv01h/comment/n24bglu/?context=3\n\n## Implement a NuGet Package Parser in PowerShell (Not Recommended)\n\nWhile this option is future proof and may come with other benefits, _I don't recommend this option_. It requires more work and more overhead. A strong argument could be made that this would be out of scope for this project.\n\nI have done this before, but my solution is unmaintained. I also believe the most recent version is broken (older versions--older than version 0.4--reportedly work): https://github.com/pwsh-cs-tools/Import-Package\n\nThis uses NuGet's own C# libraries for parsing their own packages then uses that to break C# .nupkgs down into their relevant files for the target OS.\n\nThis is the other benefit. NuGet packages are currently designed to be digested at compile time. Developing this tool would not only allow them to be digested in PowerShell, but be digested at runtime in general, allowing C# developers to import .nupkgs as desired at runtime. Again, while nice, this is out of scope. So take that into consideration when deciding to add this to the stuff you want to maintain.\n\n**For more on how this method would be utilitized, you can read about it here:**\n- most relevant: https://www.reddit.com/r/PowerShell/comments/192uavr/turning_powershell_into_a_python_engine/\n- how to develop solution: https://www.reddit.com/r/PowerShell/comments/171886q/nugetpackaging_in_powershell_a_dependency_for/\n- another use case: https://www.reddit.com/r/PowerShell/comments/199i7nr/now_presenting_the_thanos_shauntlet/\n- where `Import-Package` started: https://www.reddit.com/r/PowerShell/comments/172t0sj/just_published_the_very_first_prerelease_of_the/","author":{"url":"https://github.com/anonhostpi","@type":"Person","name":"anonhostpi"},"datePublished":"2025-07-09T23:40:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/2601/pythonnet/issues/2601"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:82e03aa6-4e68-affd-84ad-4723ac83d4de |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D626:3F19FC:236B1F:32CF37:696F983E |
| html-safe-nonce | 8ec182b3916c9ec87287611d09a1731ffc862c0fa9be5fc0bfadc89e57c88c92 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENjI2OjNGMTlGQzoyMzZCMUY6MzJDRjM3OjY5NkY5ODNFIiwidmlzaXRvcl9pZCI6IjM2NjgzMjEyNzQyNDU5MTI2MzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3a9f0fd3254a6fc3087ab968ef8e4257d3bc5659d74e69f29aa2695cf35cbd4e |
| hovercard-subject-tag | issue:3217431106 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/pythonnet/pythonnet/2601/issue_layout |
| twitter:image | https://opengraph.githubassets.com/eac03b01113cd28c25dae6a702297eaad6754a8809119839348a3d9b38652e00/pythonnet/pythonnet/issues/2601 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/eac03b01113cd28c25dae6a702297eaad6754a8809119839348a3d9b38652e00/pythonnet/pythonnet/issues/2601 |
| og:image:alt | SHILL DISCLAIMER: The reddit links are to my posts. Not trying to farm. I just don't know of anyone else who has already started work on this. Background A little known fact about PowerShell is tha... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | anonhostpi |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0ca8d8c65612640b9a1a588b3eed68222ca723ed2d028b18fe81b28936d535eb |
| turbo-cache-control | no-preview |
| go-import | github.com/pythonnet/pythonnet git https://github.com/pythonnet/pythonnet.git |
| octolytics-dimension-user_id | 6050430 |
| octolytics-dimension-user_login | pythonnet |
| octolytics-dimension-repository_id | 14748123 |
| octolytics-dimension-repository_nwo | pythonnet/pythonnet |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14748123 |
| octolytics-dimension-repository_network_root_nwo | pythonnet/pythonnet |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 95f60616ce2765d1114fe6da4af405a58c6d26d2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width