Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Microsoft.Extensions.ObjectPool to 6.0.8 #17998

Closed
tomeyerman opened this issue Aug 31, 2022 · 7 comments
Closed

Bump Microsoft.Extensions.ObjectPool to 6.0.8 #17998

tomeyerman opened this issue Aug 31, 2022 · 7 comments
Labels
Issue-Enhancement the issue is more of a feature request than a bug Needs-Triage The issue is new and needs to be triaged by a work group. Resolution-Declined The proposed feature is declined.

Comments

@tomeyerman
Copy link

Summary of the new feature / enhancement

I'd like to use expose some libraries I've written as Powershell cmdlets...however I'm unable to run them in PS currently because these libraries reference Microsoft.Extensions.ObjectPool 6.0.8 and PowerShell is still using version 5. If someone could bump it, I would greatly appreciate it :)

Proposed technical implementation details (optional)

No response

@tomeyerman tomeyerman added Issue-Enhancement the issue is more of a feature request than a bug Needs-Triage The issue is new and needs to be triaged by a work group. labels Aug 31, 2022
@tomeyerman
Copy link
Author

Opened PR 17999 to address.

@ghost ghost added the In-PR Indicates that a PR is out for the issue label Aug 31, 2022
@daxian-dbw
Copy link
Member

daxian-dbw commented Aug 31, 2022

PowerShell doesn't directly reference Microsoft.Extensions.ObjectPool. Instead, PowerShell references System.Private.ServiceModel, which depends on Microsoft.Extensions.ObjectPool (>= 5.0.10) even for its latest version (4.10.0).

The [cgmanifest.json](https://github.com/PowerShell/PowerShell/pull/17999/files#diff-2dbca354d25860d8a564159de6e6aa5be32423f7c475a9c120383d5df7c2d66a) file is auto-generated to reflect the dependencies of PowerShell, which is then used to auto-generate our ThirdPartyNotice. So, it shouldn't be changed.

In you case, you may want to read the "Resolving dependency conflict" doc. The samples in https://github.com/daxian-dbw/PowerShell-ALC-Samples may also be helpful to you.

GitHub
Samples for solving PowerShell module assembly dependency conflicts using `AssemblyLoadContext`. - GitHub - daxian-dbw/PowerShell-ALC-Samples: Samples for solving PowerShell module assembly depende...

@ghost ghost removed the In-PR Indicates that a PR is out for the issue label Aug 31, 2022
@iSazonov iSazonov added the Resolution-Declined The proposed feature is declined. label Sep 1, 2022
@ghost
Copy link

ghost commented Sep 2, 2022

This issue has been marked as declined and has not had any activity for 1 day. It has been closed for housekeeping purposes.

@ghost ghost closed this as completed Sep 2, 2022
@fMichaleczek
Copy link

@daxian-dbw Microsoft.Extensions.ObjectPool is distributed in the aspnet.core shared runtime.

image

This has no impact for importing the PowerShell SDK into AspNet.Core. (dependencies are satisfied)
On the other hand, it can block the loading of AspNet.Core in PowerShell.

Wouldn't it be possible to put an explicit dependency in Microsoft.PowerShell.SDK?

I'm working on PowerShell WASM and need to be able to load AspNet.Core into PowerShell for easier development.
I put an ALC in my module but however it is possible to reopen the issue.

@OQO
Copy link

OQO commented Jan 5, 2024

Suffering same problem. We cannot run PowerShell commandlets that use/reference aspnet.core

As a workaround we currently manually remove or replace Microsoft.Extensions.ObjectPool.dll in the PowerShell installation directory.

Also see issue dotnet/aspnetcore#47352

Would be great if this could be resolved.

@nczsl
Copy link

nczsl commented Feb 10, 2024

same problem trigger on .net 8.0.1

@nczsl
Copy link

nczsl commented Feb 10, 2024

遭受同样的问题。我们无法运行使用/引用 aspnet.core 的 PowerShell commandlet

作为解决方法,我们目前手动删除或替换 PowerShell 安装目录中的 Microsoft.Extensions.ObjectPool.dll。

另请参阅问题 dotnet/aspnetcore#47352

如果这个问题能得到解决,那就太好了。

Your method seems to work

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement the issue is more of a feature request than a bug Needs-Triage The issue is new and needs to be triaged by a work group. Resolution-Declined The proposed feature is declined.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants