jstedfast / MimeKit

A .NET MIME creation and parser library with support for S/MIME, PGP, DKIM, TNEF and Unix mbox spools.
http://www.mimekit.net
MIT License
1.79k stars 360 forks source link

Make more packages conditional based on TFM #1013

Closed thompson-tomo closed 3 months ago

thompson-tomo commented 4 months ago

Is your feature request related to a problem? Please describe.

I want to minimise dependencies in my project by utilising framework dependencies wherever possible

Describe the solution you'd like

The following packages should not be included in net 8.0

It should be determined which one's should be included in net 6 & net standard 2.1, with my feeling being both can be removed, and some additional one's in 2.1

Describe alternatives you've considered

Accept the additional dependency

Additional context

n/a

jstedfast commented 4 months ago

Do you have documentation that shows those aren't needed?

thompson-tomo commented 4 months ago

@jstedfast the easiest way I have found to check what is included by the base framework, is to expand the framework reference in visual studio and from there you can see what libraries the framework provides.

Those framework references are the reason you don't need to add any references to enable file system etc.

You can also refer to https://learn.microsoft.com/en-us/aspnet/core/fundamentals/target-aspnetcore

Note I have done such a clean up for Elastic, rabbitmq hot chocolate etc.

jstedfast commented 3 months ago

They needed to be removed for net6.0 as well so I just commit my own patch.

Thanks for bringing this to my attention and offering a PR, though!

(Also sorry for taking so long to get to this, I've just been so busy on weekends)