adamhathcock / sharpcompress

SharpCompress is a fully managed C# library to deal with many compression types and formats.
MIT License
2.25k stars 479 forks source link

Consider use of branches for different NET-runtime versions #46

Closed norvegec closed 8 years ago

norvegec commented 9 years ago

My goal is to have NET3.5-targeted project with tests. Afaik, Microsoft unit test projects require NET3.5 or newer. SharpCompress.NET2 is easily upgradeable to 3.5 (just remove LinqBridge and target 3.5). The problems with different runtime versions had arosed, when I cloned the SharpCompress.Test to target NET3.5. Some of those problems are, for example: optional parameters, absence of some IO.Directory methods, IEnumerable<T> is not covariant.

So, can we replace preprocessor-directives style of code with project-by-framework style? We can use different branches to simplify support. What do you think?

As a side note, do we really need to support NET2 version? Windows 7 and newer (client) and Windows 2008 R2 SP1 (server) are shipped with NET 3.5.

adamhathcock commented 9 years ago

Branches could work. First, I'd want to reduce the supported frameworks.

Ideally, I was going to drop support for anything not portable or pre-4.0. (or maybe pre-4.5 because of async/await, not that it is used). I just literally have not had the time to work on this for years now.

Why support 3.5?

norvegec commented 9 years ago

Why support 3.5?

I am planning to use it as part of SharePoint 2010 solution.

adamhathcock commented 8 years ago

I'm going to use xproj for this when NET Core and ASP.NET get released