Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove net462 TargetFramework as net462 is supported by netstandard2.0 #1118

Closed
wants to merge 2 commits into from

Conversation

charlesroddie
Copy link
Contributor

The net462 TargetFramework in svg.csproj is unnecessary as net462 is supported by netstandard.

This allows cleaning up some code using #if annotations for Net462 and NETFULL.

Some code is removed which only works on Net462: RegisterEvents involving mice, and Web/SvgHandler.cs. It is assumed that these are legacy methods which are no longer needed as they work only on Net462.

Tests and samples involving net462 are unchanged

@paulushub paulushub self-assigned this Jan 2, 2024
@paulushub
Copy link
Contributor

paulushub commented Jan 2, 2024

@charlesroddie Thanks for the contribution. Please tiny up but keep the support for .NET 4.6.2.
It is a multiple framework support and having .NET 4.6.2 does not affect anyone.
See the packaging of SkiSharp by Microsoft, it supports

  • .NET Core 3.1
  • .NET Framework 4.6.2
  • .NET Standard 1.3
  • .NET Standard 2.0
  • .NET Standard 2.1
  • .NET 6.0
  • etc.

Libraries like Svg.Skia, which depends on SkiaSharp can actually also support these frameworks, if they wish.
Industrial platform like MATLAB support .NET Framework Version 4.0 run time and higher, all the samples are for .NET 4.0.

@charlesroddie charlesroddie changed the title Remove net462, which is supported by netstandard2.0 Remove net462 TargetFramework as net462 is supported by netstandard2.0 Jan 3, 2024
@charlesroddie
Copy link
Contributor Author

charlesroddie commented Jan 3, 2024

@charlesroddie Thanks for the contribution. Please tiny up but keep the support for .NET 4.6.2. It is a multiple framework support and having .NET 4.6.2 does not affect anyone.

This PR doesn't remove support for .NET 4.6.2 since it retains netstandard2.0 which supports .Net 4.6.2.

Libraries like Svg.Skia, which depends on SkiaSharp can actually also support these frameworks, if they wish. Industrial platform like MATLAB support .NET Framework Version 4.0 run time and higher, all the samples are for .NET 4.0.

Svg.Skia targets netstandard2.0, net6.0, and net8.0 (https://github.com/wieslawsoltes/Svg.Skia/blob/master/src/Svg.Skia/Svg.Skia.csproj#L5) and supports .Net 4.6.2 via netstandard2.0. This is a reasonable combination.

See the packaging of SkiSharp by Microsoft

I am not competent to understand how SkiaSharp uses the dotnet project system to deploy to all platforms. Presumably it has explicit framework support because of all the platform-specific native bindings it needs to support?

@mrbean-bremen
Copy link
Member

Looks like the reason for the failing tests is missing support for private fonts. From the test code:

#if NETSTANDARD
        // Private font does not work if .NET Standard.
        protected override int ExpectedSize { get { return 3000; } } // 3155
#else
        protected override int ExpectedSize { get { return 3200; } } // 3512
#endif

Not sure why NETSTANDARD is not defined in these tests. I also don't know how important it is to have private font support for 4.6.2.

@paulushub
Copy link
Contributor

This PR doesn't remove support for .NET 4.6.2 since it retains netstandard2.0 which supports .Net 4.6.2.

It works but packaging netstandard2.0 assemblies with final build application is not what everybody want to do.

I am not competent to understand how SkiaSharp uses the dotnet project system to deploy to all platforms.

Easy way, compare the output directory (bin) of each SVG-NET platform build. The presence of the .net standard 2.0 assemblies in the .net462 directory is due to ExCSS excluding .net462 support.

@paulushub
Copy link
Contributor

I also don't know how important it is to have private font support for 4.6.2.

In SVG, I do not think it is possible to avoid private fonts, since loading any font file not installed on the system is private.
We are actually going to do more going forward to resolve some of the existing issues like #900.

@paulushub
Copy link
Contributor

@charlesroddie Thanks for the contribution. For now, we will keep net462 TargetFramework target.
Any removal will be considered after we complete the cleanup and resolve at least some of the pending issues.

@paulushub paulushub closed this Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants