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

Closed
opened 2026-01-29 22:03:44 +00:00 by claunia · 3 comments
Owner

Originally created by @norvegec on GitHub (Mar 16, 2015).

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.

Originally created by @norvegec on GitHub (Mar 16, 2015). 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`](http://en.wikipedia.org/wiki/.NET_Framework#Versions).
Author
Owner

@adamhathcock commented on GitHub (Mar 16, 2015):

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?

@adamhathcock commented on GitHub (Mar 16, 2015): 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?
Author
Owner

@norvegec commented on GitHub (Mar 16, 2015):

Why support 3.5?

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

@norvegec commented on GitHub (Mar 16, 2015): > Why support 3.5? I am planning to use it as part of `SharePoint 2010` solution.
Author
Owner

@adamhathcock commented on GitHub (Jan 9, 2016):

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

@adamhathcock commented on GitHub (Jan 9, 2016): I'm going to use xproj for this when NET Core and ASP.NET get released
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#32