dotnet / pinvoke

A library containing all P/Invoke code so you don't have to import it every time. Maintained and updated to support the latest Windows OS.
MIT License
2.12k stars 222 forks source link

net4.0 TargetFramework #561

Closed HavenDV closed 3 years ago

HavenDV commented 3 years ago

Are you planning to add it? I think you are not using an API that is not available in .Net 4.0. I know of several projects that are still releasing Windows XP and require .Net 4.0.

Lakritzator commented 3 years ago

Just my 2 cents (I'm not a maintainer of this): I really would like to motivate people to move away from unsupported technologies, like Windows XP and .NET 4.0! My standpoint is that people are still using it, as nobody is forcing them to do so, causing a lot of harm, work and issues which are not needed. I know that might not make me popular, but I am faced with technical depts every day which come from saying like "never change a running system".

The issue here, is that supporting those platforms costs effort, which is time/money, which might be better to invest into other things. I write Greenshot, and do this in my free time, supporting these versions would mean I need more hardware and installations to maintain and test my applications on it. Every change would need testing on multiple platforms, causing me to move more slowly than I already do, just to satisfy a few people that hold on to versions which I can hardly get and are unsafe.

I already have a hard time supporting the versions of Windows and .NET which are officially supported.

I would love to hear about what projects are still releasing for Windows XP... and what reasoning is behind that.

HavenDV commented 3 years ago

I believe that if I can make life easier for someone by simply including the net4.0 target framework in the list, even if half of the methods do not work, then I should. At the same time, without wasting time supporting this and easily refusing if it interferes with moving on.

I work freelance, so many projects go through me. I have an active project (which I maintain) that runs on Windows XP computers. It doesn't require PInvoke, but nonetheless. I also wrote a control for WPF / WinForms, where the customer asked to specify all TargetFramework, starting from 2.0, because his clients ask for it. Fortunately, the Net5.0 SDK dotnet build does not support net below 4.0, so I was able to persuade him to abandon them in favor of a simple release of new releases without manual builds.

Lakritzator commented 3 years ago

The point is, with making it available you also create expectations and thus commitment. If something suddenly doesn't work, you also have to invest time to check what it is. Some targets are hard to maintain, just as you mentioned with below 4, some day it

My standpoint for MY projects (not this): I'm not supporting anything which is not current unless someone wants to pay for it. Maybe for this project the needed additional time might not be huge, but in my projects I like to use newer C# constructs and CLR, which get harder if you go below the netstandard 2.0 supporting framework versions which is NET472. I'm not investing my free time into legacy.

Anyway it still is a valid request.

AArnott commented 3 years ago

This wouldn't be a step forward, but literally a step backward, as we in fact used to support net20, net40 and PCLs. See #435 for the discussion leading to dropping support for platforms that Microsoft doesn't support either.