From 420ee817ffa09f4ba748541637b555de7ecfdf52 Mon Sep 17 00:00:00 2001 From: Jevon Date: Wed, 6 Apr 2022 22:01:17 +0100 Subject: [PATCH 1/6] Update project files to target `net462` and `DOTNET45` constant to `DOTNET462` --- buildscripts/common.props | 16 ++++------------ src/Castle.Core.Tests.WeakNamed/App.config | 2 +- .../Castle.Core.Tests.WeakNamed.csproj | 2 +- src/Castle.Core.Tests/Castle.Core.Tests.csproj | 4 ++-- src/Castle.Core.Tests/PublicApiTestCase.cs | 2 +- src/Castle.Core.Tests/config/netfx/App.config | 2 +- src/Castle.Core/Castle.Core.csproj | 4 ++-- ...astle.Services.Logging.NLogIntegration.csproj | 2 +- ...le.Services.Logging.SerilogIntegration.csproj | 2 +- ...le.Services.Logging.log4netIntegration.csproj | 2 +- .../Explicit.NuGet.Versions.csproj | 2 +- 11 files changed, 16 insertions(+), 24 deletions(-) diff --git a/buildscripts/common.props b/buildscripts/common.props index c2d455ba2b..f9ed944f4d 100644 --- a/buildscripts/common.props +++ b/buildscripts/common.props @@ -50,20 +50,12 @@ TRACE;FEATURE_APPDOMAIN;FEATURE_ASSEMBLYBUILDER_SAVE;FEATURE_SERIALIZATION;FEATURE_SYSTEM_CONFIGURATION - - $(DiagnosticsConstants);$(DesktopClrConstants);DOTNET45 + + $(DiagnosticsConstants);$(DesktopClrConstants);DOTNET462 - - $(DesktopClrConstants);DOTNET45; - - - - $(DiagnosticsConstants);$(DesktopClrConstants);DOTNET45 - - - - $(DesktopClrConstants);DOTNET45 + + $(DesktopClrConstants);DOTNET462 diff --git a/src/Castle.Core.Tests.WeakNamed/App.config b/src/Castle.Core.Tests.WeakNamed/App.config index ae46bc7d6c..1d6d3d12ca 100644 --- a/src/Castle.Core.Tests.WeakNamed/App.config +++ b/src/Castle.Core.Tests.WeakNamed/App.config @@ -21,6 +21,6 @@ - + \ No newline at end of file diff --git a/src/Castle.Core.Tests.WeakNamed/Castle.Core.Tests.WeakNamed.csproj b/src/Castle.Core.Tests.WeakNamed/Castle.Core.Tests.WeakNamed.csproj index 0a86b41a72..fa6149cc5e 100644 --- a/src/Castle.Core.Tests.WeakNamed/Castle.Core.Tests.WeakNamed.csproj +++ b/src/Castle.Core.Tests.WeakNamed/Castle.Core.Tests.WeakNamed.csproj @@ -3,7 +3,7 @@ - net461;netcoreapp2.1;netcoreapp3.1 + net462;netcoreapp2.1;netcoreapp3.1 diff --git a/src/Castle.Core.Tests/Castle.Core.Tests.csproj b/src/Castle.Core.Tests/Castle.Core.Tests.csproj index c1fc72009a..6262b7de97 100644 --- a/src/Castle.Core.Tests/Castle.Core.Tests.csproj +++ b/src/Castle.Core.Tests/Castle.Core.Tests.csproj @@ -3,7 +3,7 @@ - net461;netcoreapp2.1;netcoreapp3.1 + net462;netcoreapp2.1;netcoreapp3.1 @@ -63,7 +63,7 @@ - + diff --git a/src/Castle.Core.Tests/PublicApiTestCase.cs b/src/Castle.Core.Tests/PublicApiTestCase.cs index 972f2fb19a..3627631a9f 100644 --- a/src/Castle.Core.Tests/PublicApiTestCase.cs +++ b/src/Castle.Core.Tests/PublicApiTestCase.cs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if DOTNET45 // PublicApiGenerator requires .NET Standard 2.0, and we only need to run it once +#if DOTNET462 // PublicApiGenerator requires .NET Standard 2.0, and we only need to run it once namespace Castle { diff --git a/src/Castle.Core.Tests/config/netfx/App.config b/src/Castle.Core.Tests/config/netfx/App.config index 9db1320536..30b40228f7 100644 --- a/src/Castle.Core.Tests/config/netfx/App.config +++ b/src/Castle.Core.Tests/config/netfx/App.config @@ -29,6 +29,6 @@ - + \ No newline at end of file diff --git a/src/Castle.Core/Castle.Core.csproj b/src/Castle.Core/Castle.Core.csproj index df20afb288..986d060278 100644 --- a/src/Castle.Core/Castle.Core.csproj +++ b/src/Castle.Core/Castle.Core.csproj @@ -3,7 +3,7 @@ - net45;netstandard2.0;netstandard2.1 + net462;netstandard2.0;netstandard2.1 @@ -28,7 +28,7 @@ - + diff --git a/src/Castle.Services.Logging.NLogIntegration/Castle.Services.Logging.NLogIntegration.csproj b/src/Castle.Services.Logging.NLogIntegration/Castle.Services.Logging.NLogIntegration.csproj index ecd678ba93..43fff83266 100644 --- a/src/Castle.Services.Logging.NLogIntegration/Castle.Services.Logging.NLogIntegration.csproj +++ b/src/Castle.Services.Logging.NLogIntegration/Castle.Services.Logging.NLogIntegration.csproj @@ -3,7 +3,7 @@ - net45;netstandard2.0;netstandard2.1 + net462;netstandard2.0;netstandard2.1 diff --git a/src/Castle.Services.Logging.SerilogIntegration/Castle.Services.Logging.SerilogIntegration.csproj b/src/Castle.Services.Logging.SerilogIntegration/Castle.Services.Logging.SerilogIntegration.csproj index 7a5c5bce0b..4cc78084dd 100644 --- a/src/Castle.Services.Logging.SerilogIntegration/Castle.Services.Logging.SerilogIntegration.csproj +++ b/src/Castle.Services.Logging.SerilogIntegration/Castle.Services.Logging.SerilogIntegration.csproj @@ -3,7 +3,7 @@ - net45;netstandard2.0;netstandard2.1 + net462;netstandard2.0;netstandard2.1 diff --git a/src/Castle.Services.Logging.log4netIntegration/Castle.Services.Logging.log4netIntegration.csproj b/src/Castle.Services.Logging.log4netIntegration/Castle.Services.Logging.log4netIntegration.csproj index fe1e9617e0..36bf7a9cd8 100644 --- a/src/Castle.Services.Logging.log4netIntegration/Castle.Services.Logging.log4netIntegration.csproj +++ b/src/Castle.Services.Logging.log4netIntegration/Castle.Services.Logging.log4netIntegration.csproj @@ -3,7 +3,7 @@ - net45;netstandard2.0;netstandard2.1 + net462;netstandard2.0;netstandard2.1 diff --git a/tools/Explicit.NuGet.Versions/Explicit.NuGet.Versions.csproj b/tools/Explicit.NuGet.Versions/Explicit.NuGet.Versions.csproj index b8e2cb783a..d48a71e81b 100644 --- a/tools/Explicit.NuGet.Versions/Explicit.NuGet.Versions.csproj +++ b/tools/Explicit.NuGet.Versions/Explicit.NuGet.Versions.csproj @@ -2,7 +2,7 @@ Exe - net45 + net462 build\ false nev From 29738cf6db3246cf6e8caed9846f615092fbd49e Mon Sep 17 00:00:00 2001 From: Jevon Date: Wed, 6 Apr 2022 22:02:00 +0100 Subject: [PATCH 2/6] Update `ref/` classes to match move to `net462` --- ref/{Castle.Core-net45.cs => Castle.Core-net462.cs} | 2 +- ...t45.cs => Castle.Services.Logging.NLogIntegration-net462.cs} | 2 +- ....cs => Castle.Services.Logging.SerilogIntegration-net462.cs} | 2 +- ....cs => Castle.Services.Logging.log4netIntegration-net462.cs} | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename ref/{Castle.Core-net45.cs => Castle.Core-net462.cs} (99%) rename ref/{Castle.Services.Logging.NLogIntegration-net45.cs => Castle.Services.Logging.NLogIntegration-net462.cs} (99%) rename ref/{Castle.Services.Logging.SerilogIntegration-net45.cs => Castle.Services.Logging.SerilogIntegration-net462.cs} (98%) rename ref/{Castle.Services.Logging.log4netIntegration-net45.cs => Castle.Services.Logging.log4netIntegration-net462.cs} (99%) diff --git a/ref/Castle.Core-net45.cs b/ref/Castle.Core-net462.cs similarity index 99% rename from ref/Castle.Core-net45.cs rename to ref/Castle.Core-net462.cs index f4914b2c7b..e74ecc483d 100644 --- a/ref/Castle.Core-net45.cs +++ b/ref/Castle.Core-net462.cs @@ -2,7 +2,7 @@ [assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/castleproject/Core")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo(@"Castle.Core.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010077f5e87030dadccce6902c6adab7a987bd69cb5819991531f560785eacfc89b6fcddf6bb2a00743a7194e454c0273447fc6eec36474ba8e5a3823147d214298e4f9a631b1afee1a51ffeae4672d498f14b000e3d321453cdd8ac064de7e1cf4d222b7e81f54d4fd46725370d702a05b48738cc29d09228f1aa722ae1a9ca02fb")] [assembly: System.Runtime.InteropServices.ComVisible(false)] -[assembly: System.Runtime.Versioning.TargetFramework(".NETFramework,Version=v4.5", FrameworkDisplayName=".NET Framework 4.5")] +[assembly: System.Runtime.Versioning.TargetFramework(".NETFramework,Version=v4.6.2", FrameworkDisplayName=".NET Framework 4.6.2")] namespace Castle.Components.DictionaryAdapter { public abstract class AbstractDictionaryAdapter : System.Collections.ICollection, System.Collections.IDictionary, System.Collections.IEnumerable diff --git a/ref/Castle.Services.Logging.NLogIntegration-net45.cs b/ref/Castle.Services.Logging.NLogIntegration-net462.cs similarity index 99% rename from ref/Castle.Services.Logging.NLogIntegration-net45.cs rename to ref/Castle.Services.Logging.NLogIntegration-net462.cs index 53b6d82a72..ced3097bcb 100644 --- a/ref/Castle.Services.Logging.NLogIntegration-net45.cs +++ b/ref/Castle.Services.Logging.NLogIntegration-net462.cs @@ -1,7 +1,7 @@ [assembly: System.CLSCompliant(true)] [assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/castleproject/Core")] [assembly: System.Runtime.InteropServices.ComVisible(false)] -[assembly: System.Runtime.Versioning.TargetFramework(".NETFramework,Version=v4.5", FrameworkDisplayName=".NET Framework 4.5")] +[assembly: System.Runtime.Versioning.TargetFramework(".NETFramework,Version=v4.6.2", FrameworkDisplayName=".NET Framework 4.6.2")] namespace Castle.Services.Logging.NLogIntegration { public class ExtendedNLogFactory : Castle.Core.Logging.AbstractExtendedLoggerFactory diff --git a/ref/Castle.Services.Logging.SerilogIntegration-net45.cs b/ref/Castle.Services.Logging.SerilogIntegration-net462.cs similarity index 98% rename from ref/Castle.Services.Logging.SerilogIntegration-net45.cs rename to ref/Castle.Services.Logging.SerilogIntegration-net462.cs index fc46800eff..3c486e2336 100644 --- a/ref/Castle.Services.Logging.SerilogIntegration-net45.cs +++ b/ref/Castle.Services.Logging.SerilogIntegration-net462.cs @@ -1,5 +1,5 @@ [assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/castleproject/Core")] -[assembly: System.Runtime.Versioning.TargetFramework(".NETFramework,Version=v4.5", FrameworkDisplayName=".NET Framework 4.5")] +[assembly: System.Runtime.Versioning.TargetFramework(".NETFramework,Version=v4.6.2", FrameworkDisplayName=".NET Framework 4.6.2")] namespace Castle.Services.Logging.SerilogIntegration { public class SerilogFactory : Castle.Core.Logging.AbstractLoggerFactory diff --git a/ref/Castle.Services.Logging.log4netIntegration-net45.cs b/ref/Castle.Services.Logging.log4netIntegration-net462.cs similarity index 99% rename from ref/Castle.Services.Logging.log4netIntegration-net45.cs rename to ref/Castle.Services.Logging.log4netIntegration-net462.cs index 5f4e56dc20..1ff95f33aa 100644 --- a/ref/Castle.Services.Logging.log4netIntegration-net45.cs +++ b/ref/Castle.Services.Logging.log4netIntegration-net462.cs @@ -1,7 +1,7 @@ [assembly: System.CLSCompliant(true)] [assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/castleproject/Core")] [assembly: System.Runtime.InteropServices.ComVisible(false)] -[assembly: System.Runtime.Versioning.TargetFramework(".NETFramework,Version=v4.5", FrameworkDisplayName=".NET Framework 4.5")] +[assembly: System.Runtime.Versioning.TargetFramework(".NETFramework,Version=v4.6.2", FrameworkDisplayName=".NET Framework 4.6.2")] namespace Castle.Services.Logging.Log4netIntegration { public class ExtendedLog4netFactory : Castle.Core.Logging.AbstractExtendedLoggerFactory From 931431a010ec61111919ff3423172dea328fd064 Mon Sep 17 00:00:00 2001 From: Jevon Date: Wed, 6 Apr 2022 22:04:11 +0100 Subject: [PATCH 3/6] Update build scripts to reflect move to `net462` --- build.sh | 6 +++--- buildscripts/build.cmd | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build.sh b/build.sh index 2ddeb562f4..2f4ea38bc1 100755 --- a/build.sh +++ b/build.sh @@ -41,11 +41,11 @@ echo "OSNAME: $OSNAME" dotnet build --configuration Release || exit 1 echo -------------------- -echo Running NET461 Tests +echo Running NET462 Tests echo -------------------- -mono ./src/Castle.Core.Tests/bin/Release/net461/Castle.Core.Tests.exe --result=DesktopClrTestResults.xml;format=nunit3 -mono ./src/Castle.Core.Tests.WeakNamed/bin/Release/net461/Castle.Core.Tests.WeakNamed.exe --result=DesktopClrWeakNamedTestResults.xml;format=nunit3 +mono ./src/Castle.Core.Tests/bin/Release/net462/Castle.Core.Tests.exe --result=DesktopClrTestResults.xml;format=nunit3 +mono ./src/Castle.Core.Tests.WeakNamed/bin/Release/net462/Castle.Core.Tests.WeakNamed.exe --result=DesktopClrWeakNamedTestResults.xml;format=nunit3 echo --------------------------- echo Running NETCOREAPP3.1 Tests diff --git a/buildscripts/build.cmd b/buildscripts/build.cmd index 3f4ee36ec4..1c3831f220 100644 --- a/buildscripts/build.cmd +++ b/buildscripts/build.cmd @@ -34,11 +34,11 @@ GOTO test :test echo -------------------- -echo Running NET461 Tests +echo Running NET462 Tests echo -------------------- -%UserProfile%\.nuget\packages\nunit.consolerunner\3.11.1\tools\nunit3-console.exe src/Castle.Core.Tests/bin/%Configuration%/net461/Castle.Core.Tests.exe --result=DesktopClrTestResults.xml;format=nunit3 || exit /b 1 -%UserProfile%\.nuget\packages\nunit.consolerunner\3.11.1\tools\nunit3-console.exe src/Castle.Core.Tests.WeakNamed/bin/%Configuration%/net461/Castle.Core.Tests.WeakNamed.exe --result=DesktopClrWeakNamedTestResults.xml;format=nunit3 || exit /b 1 +%UserProfile%\.nuget\packages\nunit.consolerunner\3.11.1\tools\nunit3-console.exe src/Castle.Core.Tests/bin/%Configuration%/net462/Castle.Core.Tests.exe --result=DesktopClrTestResults.xml;format=nunit3 || exit /b 1 +%UserProfile%\.nuget\packages\nunit.consolerunner\3.11.1\tools\nunit3-console.exe src/Castle.Core.Tests.WeakNamed/bin/%Configuration%/net462/Castle.Core.Tests.WeakNamed.exe --result=DesktopClrWeakNamedTestResults.xml;format=nunit3 || exit /b 1 echo --------------------------- echo Running NETCOREAPP3.1 Tests From 312231483a1579337c396be14421d54601d073b7 Mon Sep 17 00:00:00 2001 From: Jevon Date: Wed, 6 Apr 2022 22:07:58 +0100 Subject: [PATCH 4/6] Update documentation to reflect `net462` as minimum version --- README.md | 6 +++--- docs/dynamicproxy-introduction.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1387fff1e3..e11c9ce22e 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ build.cmd Compilation requires a C# 9 compiler, an up-to-date .NET Core SDK, and MSBuild 15+ (which should be included in the former). -Running the unit tests additionally requires the .NET Framework 4.6.1+ as well as the .NET Core 2.1 and 3.1 runtimes to be installed. (If you do not have all of those installed, you can run the tests for a specific target framework using `dotnet test -f `.) +Running the unit tests additionally requires the .NET Framework 4.6.2+ as well as the .NET Core 2.1 and 3.1 runtimes to be installed. (If you do not have all of those installed, you can run the tests for a specific target framework using `dotnet test -f `.) These requirements should be covered by Visual Studio 2019 and the .NET 5 SDK. @@ -60,14 +60,14 @@ For known Mono defects, check [our issue tracker](https://github.com/castleproje The following conditional compilation symbols (vertical) are currently defined for each of the build configurations (horizontal): -Symbol | .NET 4.5 | .NET Standard 2.x +Symbol | .NET 4.6.2 | .NET Standard 2.x ----------------------------------- | ------------------ | ------------------ `FEATURE_APPDOMAIN` | :white_check_mark: | :no_entry_sign: `FEATURE_ASSEMBLYBUILDER_SAVE` | :white_check_mark: | :no_entry_sign: `FEATURE_SERIALIZATION` | :white_check_mark: | :no_entry_sign: `FEATURE_SYSTEM_CONFIGURATION` | :white_check_mark: | :no_entry_sign: --- | | -`DOTNET45` | :white_check_mark: | :no_entry_sign: +`DOTNET462` | :white_check_mark: | :no_entry_sign: * `FEATURE_APPDOMAIN` - enables support for features that make use of an AppDomain in the host. * `FEATURE_ASSEMBLYBUILDER_SAVE` - enabled support for saving the dynamically generated proxy assembly. diff --git a/docs/dynamicproxy-introduction.md b/docs/dynamicproxy-introduction.md index 3f2656b8e3..dc2ef36b64 100644 --- a/docs/dynamicproxy-introduction.md +++ b/docs/dynamicproxy-introduction.md @@ -9,7 +9,7 @@ DynamicProxy differs from the proxy implementation built into the CLR which requ To use Castle DynamicProxy you need the following environment: * one of the following runtimes installed - * .NET Framework 4.5+ + * .NET Framework 4.6.2+ * .NET Core 2.1+ * any another .NET platform that supports .NET Standard 2.0+ and runtime type generation using System.Reflection.Emit * `Castle.Core.dll` (assembly where DynamicProxy lives) From 1ecb075d9fe40d90603768403736430c3a4ddd4f Mon Sep 17 00:00:00 2001 From: Jevon Date: Wed, 6 Apr 2022 22:20:18 +0100 Subject: [PATCH 5/6] Update CHANGELOG to reflect `net462` as minimum version --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f89df8fbd..ee8352f9f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ Bugfixes: - Upgrade log4net to v2.0.13 (@jonorossi, @stakx, @dschwartzni, #574, #605) Deprecations: - - Removed support for the .NET Framework < 4.5 and .NET Standard 1.x. (@stakx, #495, #496) + - Removed support for the .NET Framework < 4.6.2 and .NET Standard 1.x. (@stakx, #495, #496; @Jevonius, #614) - Removed support for Code Access Security (CAS). (@stakx, #502) - Removed support for Remoting. This library no longer defines any types deriving from `MarshalByRefObject`, and `ProxyUtil.IsProxy` (which used to recognize remoting/"transparent" proxies) now tests only for DynamicProxy proxies. (@stakx, #507) - The following public members have been removed: From ebd23a28f3dacb7e20272057cb009068c73259d9 Mon Sep 17 00:00:00 2001 From: Jevon Date: Thu, 7 Apr 2022 08:25:55 +0100 Subject: [PATCH 6/6] Update GitHub Actions build script to reflect move to `net462` --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 83a3202914..e813b26d24 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -62,11 +62,11 @@ jobs: - name: Test on .NET Core 3.1 run: dotnet test -c Release -f netcoreapp3.1 --no-build --no-restore -l "console;verbosity=detailed" - - name: Test on .NET Framework 4.6.1 (Windows only) + - name: Test on .NET Framework 4.6.2 (Windows only) if: matrix.os == 'windows-latest' - run: dotnet test -c Release -f net461 --no-build --no-restore -l "console;verbosity=detailed" + run: dotnet test -c Release -f net462 --no-build --no-restore -l "console;verbosity=detailed" - - name: Test on .NET Framework 4.6.1 using Mono (Linux only) + - name: Test on .NET Framework 4.6.2 using Mono (Linux only) if: matrix.os == 'ubuntu-latest' run: | - docker run --rm -v "$PWD":'/project' -w='/project' mono:$MONO_TAG bash -c 'mono ./src/Castle.Core.Tests/bin/Release/net461/Castle.Core.Tests.exe && mono ./src/Castle.Core.Tests.WeakNamed/bin/Release/net461/Castle.Core.Tests.WeakNamed.exe' + docker run --rm -v "$PWD":'/project' -w='/project' mono:$MONO_TAG bash -c 'mono ./src/Castle.Core.Tests/bin/Release/net462/Castle.Core.Tests.exe && mono ./src/Castle.Core.Tests.WeakNamed/bin/Release/net462/Castle.Core.Tests.WeakNamed.exe'