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

Multitarget for Microsoft.Extensions.ObjectPool #193

Closed
wants to merge 1 commit into from
Closed

Multitarget for Microsoft.Extensions.ObjectPool #193

wants to merge 1 commit into from

Conversation

sungam3r
Copy link
Collaborator

No description provided.

@sungam3r sungam3r added the dependencies Pull requests that update a dependency file label Mar 14, 2024
@ArieGato
Copy link
Owner

@sungam3r Could you create an issue for this and include why this is necessary?

@ArieGato
Copy link
Owner

@sungam3r The build failed. Any idea why?

@sungam3r
Copy link
Collaborator Author

Could you create an issue for this and include why this is necessary?

This is general-purpose versioning strategy when using MS packages from .NET Core. It's more simple and consumer-friendly. Consumers always use version of MS package corresponding to consumers' TFM. We should not force consumers of net5/net6/net7 apps to use Microsoft.Extensions.ObjectPool v8.x . It really can break them.

The only think I'm not sure is

  <ItemGroup  Condition="'$(TargetFramework)' == 'netstandard2.0'">
    <PackageReference Include="Microsoft.Extensions.ObjectPool" Version="2.1.0" />
  </ItemGroup>

I chose the lowest not obsolete version with the most downloads.

@sungam3r
Copy link
Collaborator Author

Superseded by #197.

@sungam3r sungam3r closed this Mar 18, 2024
@sungam3r sungam3r deleted the tfm branch March 18, 2024 15:54
@sungam3r
Copy link
Collaborator Author

sungam3r commented Mar 18, 2024

The build failed. Any idea why?

Microsoft.Extensions.ObjectPool.DisposableObjectPool<Serilog.Sinks.RabbitMQ.IRabbitMQChannel> on NET Core and
Microsoft.Extensions.ObjectPool.DefaultObjectPool<Serilog.Sinks.RabbitMQ.IRabbitMQChannel> on net48 (netstandard2.0)

I bumped package version to 2.2.0.

I chose the lowest not obsolete version with the most downloads.

😕 2.2.0 has more downloads indeed.

@sungam3r
Copy link
Collaborator Author

I was wrong, not 2.2.0 but 3.0.0 is required to align types.

By the way this is not necessarily to bump to 3.0.0. I can just modify test to not expect Dispose call on net48. Up to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants