MSBuildSdkExtras icon indicating copy to clipboard operation
MSBuildSdkExtras copied to clipboard

Add support for .NET 3.5 Compact Framework?

Open feO2x opened this issue 7 years ago • 4 comments

What do you think about adding support for .NET CF 3.5? There is a gist that explains how to do it manually: https://gist.github.com/skarllot/4953ddb6e23d8a6f0816029c4155997a

I'm not sure if the different steps like adding RedistList\FrameworkList.xml and the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v3.5,Profile=CompactFramework can be replaced by msbuild properties or targets. Do you think it's possible?

feO2x avatar Mar 16 '18 08:03 feO2x

I can give it a shot on a VM later this week. In theory, you shouldn't need any registry updates; just the SDK that contains the targets.

Then it should just a matter of setting the LanguageTargets (directly or indirectly, which we have to do so VSfM doesn't fail).

We can also set some intelligent defaults, like turning off the AssemblyFileVersion for that TFM if it's not supported there.

Question -- how much 3.5 CF is still being actively developed?

clairernovotny avatar Mar 17 '18 16:03 clairernovotny

You're right, the platform is pretty much dead. But I think there are several legacy hardware devices in production environments that run solely on WinCE. E.g. at work, we have to support a hand-held barcode scanner which runs on this OS.

And MSBuildSdkExtras is pretty great - in the easiest case you only have to change two lines in csproj to support a new framework. Maybe if we can encourage OS developers to easily support "older" platforms, then we have the same opportunities as we have with the full framework.

Personally, I want to support NET-CF 3.5 in Light.GuardClauses 4.0 - because we use it heavily in our projects for precondition checks.

feO2x avatar Mar 17 '18 17:03 feO2x

Maybe importing automatically the 'NETStandard.WindowsCE' package (https://github.com/WindowsCE/NETStandard.WindowsCE/) is a better approach for better supporting multiple frameworks along with NET-CF 3.5.

It already adds the 'AssemblyFileVersion' attribute and other modern types.

Discaimer: this package is developed by me.

skarllot avatar Mar 26 '18 18:03 skarllot

For whom is looking for this issue, the package NETStandard.WindowsCE already defines the 'net35-cf' target by itself.

Ref: NETStandard.WindowsCE.props

skarllot avatar Aug 06 '19 20:08 skarllot