Skip to content

Commit

Permalink
[WiP] Drop support for .NET Standard 2.0 and Mono
Browse files Browse the repository at this point in the history
  • Loading branch information
kleisauke committed Dec 10, 2023
1 parent f31f1ea commit 19316bc
Show file tree
Hide file tree
Showing 30 changed files with 119 additions and 302 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ jobs:
- os: ubuntu-22.04
container: mcr.microsoft.com/dotnet/sdk:8.0-alpine3.18
script: ./build.sh
# TODO(kleisauke): Re-enable Mono CI when C# 9 features are supported.
# - os: ubuntu-22.04
# script: ./build/test-mono.sh
# allow_failures: true
- os: macos-12
script: ./build.sh
- os: windows-2022
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ which gives some more background.
## Supported platforms

- .NET Framework 4.5.2 and higher
- .NET Standard 2.0 and higher
- Mono
- .NET 6.0 and higher

## Install

Expand Down
11 changes: 0 additions & 11 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,21 +132,10 @@ protected override void OnBuildInitialized()
.DependsOn(Clean)
.Executes(() =>
{
// Need to build the macOS and *nix DLL first.
DotNetBuild(c => c
.SetProjectFile(Solution.NetVips)
.SetConfiguration(Configuration)
.SetFramework("netstandard2.0")
.AddProperty("Platform", "AnyCPU")
.CombineWith(
new[] { "OSX", "Unix" },
(_, os) => _.AddProperty("TargetOS", os)));

DotNetPack(c => c
.SetProject(Solution.NetVips)
.SetConfiguration(Configuration)
.SetOutputDirectory(ArtifactsDirectory)
.AddProperty("TargetOS", "Windows")
);
});

Expand Down
5 changes: 1 addition & 4 deletions build/native/NetVips.Native.linux-arm.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
</metadata>
<files>

<!-- The .NET Framework >= 4.6.1 build bits for Mono runtime -->
<file src="targets\NetVips.Native.linux-arm.targets" target="build/net461" />

<!-- Include libvips Linux ARM64v8 binaries -->
<file src="pack\linux-arm\*.so*" target="runtimes/linux-arm/native" />

Expand All @@ -35,7 +32,7 @@
<file src="pack\linux-arm\versions.json" />

<!-- A dummy reference which prevents NuGet from adding any compilation references when this package is imported -->
<file src="_._" target="lib/netstandard1.0" />
<file src="_._" target="lib/net6.0" />

</files>
</package>
5 changes: 1 addition & 4 deletions build/native/NetVips.Native.linux-arm64.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
</metadata>
<files>

<!-- The .NET Framework >= 4.6.1 build bits for Mono runtime -->
<file src="targets\NetVips.Native.linux-arm64.targets" target="build/net461" />

<!-- Include libvips Linux ARM64v8 binaries -->
<file src="pack\linux-arm64\*.so*" target="runtimes/linux-arm64/native" />

Expand All @@ -35,7 +32,7 @@
<file src="pack\linux-arm64\versions.json" />

<!-- A dummy reference which prevents NuGet from adding any compilation references when this package is imported -->
<file src="_._" target="lib/netstandard1.0" />
<file src="_._" target="lib/net6.0" />

</files>
</package>
3 changes: 1 addition & 2 deletions build/native/NetVips.Native.linux-musl-arm64.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
<file src="pack\linux-musl-arm64\versions.json" />

<!-- A dummy reference which prevents NuGet from adding any compilation references when this package is imported -->
<!-- Note: Linux musl ARM64v8 is supported since .NET Core 3.0 (.NET Standard 2.1) -->
<file src="_._" target="lib/netstandard2.1" />
<file src="_._" target="lib/net6.0" />

</files>
</package>
5 changes: 1 addition & 4 deletions build/native/NetVips.Native.linux-musl-x64.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
</metadata>
<files>

<!-- The .NET Framework >= 4.6.1 build bits for Mono runtime -->
<file src="targets\NetVips.Native.linux-musl-x64.targets" target="build/net461" />

<!-- Include libvips Linux musl x64 binaries -->
<file src="pack\linux-musl-x64\*.so*" target="runtimes/linux-musl-x64/native" />

Expand All @@ -35,7 +32,7 @@
<file src="pack\linux-musl-x64\versions.json" />

<!-- A dummy reference which prevents NuGet from adding any compilation references when this package is imported -->
<file src="_._" target="lib/netstandard1.0" />
<file src="_._" target="lib/net6.0" />

</files>
</package>
5 changes: 1 addition & 4 deletions build/native/NetVips.Native.linux-x64.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
</metadata>
<files>

<!-- The .NET Framework >= 4.6.1 build bits for Mono runtime -->
<file src="targets\NetVips.Native.linux-x64.targets" target="build/net461" />

<!-- Include libvips Linux x64 binaries -->
<file src="pack\linux-x64\*.so*" target="runtimes/linux-x64/native" />

Expand All @@ -35,7 +32,7 @@
<file src="pack\linux-x64\versions.json" />

<!-- A dummy reference which prevents NuGet from adding any compilation references when this package is imported -->
<file src="_._" target="lib/netstandard1.0" />
<file src="_._" target="lib/net6.0" />

</files>
</package>
17 changes: 2 additions & 15 deletions build/native/NetVips.Native.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,20 @@

<!-- dependencies -->
<dependencies>
<!-- In-sync with netstandard2.0 below except for NetVips.Native.win-arm64, NetVips.Native.linux-musl-arm64 and NetVips.Native.osx-arm64 -->
<group targetFramework="netstandard2.1">
<group targetFramework="net6.0">
<dependency id="NetVips.Native.linux-x64" version="$version$" include="native" />
<dependency id="NetVips.Native.linux-musl-x64" version="$version$" include="native" />
<!-- Linux musl ARM64v8 is supported since .NET Core 3.0 (.NET Standard 2.1) -->
<dependency id="NetVips.Native.linux-musl-arm64" version="$version$" include="native" />
<dependency id="NetVips.Native.linux-arm" version="$version$" include="native" />
<dependency id="NetVips.Native.linux-arm64" version="$version$" include="native" />
<dependency id="NetVips.Native.osx-x64" version="$version$" include="native" />
<!-- macOS ARM64 (Apple Silicon) is supported on .NET 6.0, but Mono has back-ported this to .NET Standard 2.1 -->
<dependency id="NetVips.Native.osx-arm64" version="$version$" include="native" />
<dependency id="NetVips.Native.win-x64" version="$version$" include="native" />
<dependency id="NetVips.Native.win-x86" version="$version$" include="native" />
<!-- Windows ARM64 is supported since .NET 5.0 and back-ported to .NET Core 3.1 (.NET Standard 2.1) -->
<dependency id="NetVips.Native.win-arm64" version="$version$" include="native" />
</group>
<group targetFramework="netstandard2.0">
<dependency id="NetVips.Native.linux-x64" version="$version$" include="native" />
<dependency id="NetVips.Native.linux-musl-x64" version="$version$" include="native" />
<dependency id="NetVips.Native.linux-arm" version="$version$" include="native" />
<dependency id="NetVips.Native.linux-arm64" version="$version$" include="native" />
<dependency id="NetVips.Native.osx-x64" version="$version$" include="native" />
<dependency id="NetVips.Native.win-x64" version="$version$" include="native" />
<dependency id="NetVips.Native.win-x86" version="$version$" include="native" />
</group>
<group targetFramework="net452">
<!-- Only .NET Framework/Mono needs to include the build directory containing the .targets file -->
<!-- Only .NET Framework needs to include the build directory containing the .targets file -->
<dependency id="NetVips.Native.win-x64" version="$version$" include="native, build" />
<dependency id="NetVips.Native.win-x86" version="$version$" include="native, build" />
</group>
Expand Down
3 changes: 1 addition & 2 deletions build/native/NetVips.Native.osx-arm64.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
<file src="pack\osx-arm64\versions.json" />

<!-- A dummy reference which prevents NuGet from adding any compilation references when this package is imported -->
<!-- Note: macOS ARM64 (Apple Silicon) is supported on .NET 6.0, but Mono has back-ported this to .NET Standard 2.1 -->
<file src="_._" target="lib/netstandard2.1" />
<file src="_._" target="lib/net6.0" />

</files>
</package>
5 changes: 1 addition & 4 deletions build/native/NetVips.Native.osx-x64.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
</metadata>
<files>

<!-- The .NET Framework >= 4.6.1 build bits for Mono runtime -->
<file src="targets\NetVips.Native.osx-x64.targets" target="build/net461" />

<!-- Include libvips macOS x64 binaries -->
<file src="pack\osx-x64\*.dylib" target="runtimes/osx-x64/native" />

Expand All @@ -35,7 +32,7 @@
<file src="pack\osx-x64\versions.json" />

<!-- A dummy reference which prevents NuGet from adding any compilation references when this package is imported -->
<file src="_._" target="lib/netstandard1.0" />
<file src="_._" target="lib/net6.0" />

</files>
</package>
3 changes: 1 addition & 2 deletions build/native/NetVips.Native.win-arm64.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
<file src="pack\win-arm64\versions.json" />

<!-- A dummy reference which prevents NuGet from adding any compilation references when this package is imported -->
<!-- Note: Windows ARM64 is supported since .NET 5.0 and back-ported to .NET Core 3.1 (.NET Standard 2.1) -->
<file src="_._" target="lib/netstandard2.1" />
<file src="_._" target="lib/net6.0" />

</files>
</package>
4 changes: 2 additions & 2 deletions build/native/NetVips.Native.win-x64.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
</metadata>
<files>

<!-- The .NET Framework >= 4.5 build bits -->
<file src="targets\NetVips.Native.win-x64.targets" target="build/net45" />
<!-- The .NET Framework >= 4.5.2 build bits -->
<file src="targets\NetVips.Native.win-x64.targets" target="build/net452" />

<!-- Include libvips Windows x64 binaries -->
<file src="pack\win-x64\*.dll" target="runtimes/win-x64/native" />
Expand Down
4 changes: 2 additions & 2 deletions build/native/NetVips.Native.win-x86.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
</metadata>
<files>

<!-- The .NET Framework >= 4.5 build bits -->
<file src="targets\NetVips.Native.win-x86.targets" target="build/net45" />
<!-- The .NET Framework >= 4.5.2 build bits -->
<file src="targets\NetVips.Native.win-x86.targets" target="build/net452" />

<!-- Include libvips Windows x86 binaries -->
<file src="pack\win-x86\*.dll" target="runtimes/win-x86/native" />
Expand Down
18 changes: 0 additions & 18 deletions build/native/targets/NetVips.Native.linux-arm.targets

This file was deleted.

18 changes: 0 additions & 18 deletions build/native/targets/NetVips.Native.linux-arm64.targets

This file was deleted.

18 changes: 0 additions & 18 deletions build/native/targets/NetVips.Native.linux-musl-x64.targets

This file was deleted.

18 changes: 0 additions & 18 deletions build/native/targets/NetVips.Native.linux-x64.targets

This file was deleted.

18 changes: 0 additions & 18 deletions build/native/targets/NetVips.Native.osx-x64.targets

This file was deleted.

45 changes: 0 additions & 45 deletions build/test-mono.sh

This file was deleted.

2 changes: 1 addition & 1 deletion docs/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"dest": "obj/temp/api",
"properties": {
"TargetFramework": "netstandard2.0"
"TargetFramework": "net6.0"
}
}
],
Expand Down
Loading

0 comments on commit 19316bc

Please sign in to comment.