diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7f11dbaa6a..ef401c0e00 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,6 +28,7 @@ jobs: dotnet-version: | 8.0.x 9.0.x + 10.0.x # ----- # Build diff --git a/appveyor.yml b/appveyor.yml index b34b33082b..867a666387 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -18,6 +18,12 @@ for: only: - image: Ubuntu2204 + # install .NET 10 SDK + install: + - curl -L https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh + - chmod +x ./dotnet-install.sh + - sudo ./dotnet-install.sh --channel 10.0 --install-dir /usr/share/dotnet + # build and run tests build_script: - uname -a @@ -46,6 +52,10 @@ for: Update-AppveyorBuild -Version ($env:APPVEYOR_REPO_TAG_NAME).TrimStart("v") } + # install .NET 10 SDK + install: + - cmd: choco install dotnet-10.0-sdk + # build and run tests build_script: - cmd: build.cmd diff --git a/buildscripts/common.props b/buildscripts/common.props index b748dd3df0..81a3e26d1b 100644 --- a/buildscripts/common.props +++ b/buildscripts/common.props @@ -1,7 +1,7 @@ - 13.0 + 14.0 $(NoWarn);CS1591;CS3014;CS3003;CS3001;CS3021 $(NoWarn);CS0612;CS0618 git diff --git a/src/Castle.Core.Tests/DynamicProxy.Tests/CustomModifiersTestCase.cs b/src/Castle.Core.Tests/DynamicProxy.Tests/CustomModifiersTestCase.cs index a432a3a753..20e3881f41 100644 --- a/src/Castle.Core.Tests/DynamicProxy.Tests/CustomModifiersTestCase.cs +++ b/src/Castle.Core.Tests/DynamicProxy.Tests/CustomModifiersTestCase.cs @@ -150,7 +150,7 @@ public void ReflectionReturnsCorrectModoptOnParamTypeForGeneratedType(string typ var modopts = this.generatedTypes[typeName].GetMethod("Foo").GetParameters()[0].GetOptionalCustomModifiers(); - CollectionAssert.AreEqual(expected: CustomModifiersTestCase.customModifiers[typeNameWithoutSuffix].Reverse(), actual: modopts); + CollectionAssert.AreEqual(expected: Enumerable.Reverse(CustomModifiersTestCase.customModifiers[typeNameWithoutSuffix]), actual: modopts); // ^ The emission of custom modifiers performed by DynamicProxy is currently geared towards // the CLR, which reports custom modifiers in reverse order. On Mono, before version 5.16, // Reflection would not report custom modifiers at all; this has now changed. But unlike the @@ -183,7 +183,7 @@ public void ReflectionReturnsCorrectModreqsOnParamTypeForGeneratedType(string ty var modreqs = this.generatedTypes[typeName].GetMethod("Foo").GetParameters()[0].GetRequiredCustomModifiers(); Assume.That(modreqs.Length > 0); // If this fails on mono/linux we have to revisit the commits and issues for IL method custom modifiers. https://github.com/castleproject/Core/issues/277 - CollectionAssert.AreEqual(expected: CustomModifiersTestCase.customModifiers[typeNameWithoutSuffix].Reverse(), actual: modreqs); + CollectionAssert.AreEqual(expected: Enumerable.Reverse(CustomModifiersTestCase.customModifiers[typeNameWithoutSuffix]), actual: modreqs); // ^ see comment about `.Reverse()` above. } @@ -205,7 +205,7 @@ public void ReflectionReturnsCorrectModoptOnReturnTypeForGeneratedType(string ty var modopts = this.generatedTypes[typeName].GetMethod("Foo").ReturnParameter.GetOptionalCustomModifiers(); Assume.That(modopts.Length > 0); // If this fails on mono/linux we have to revisit the commits and issues for IL method custom modifiers. https://github.com/castleproject/Core/issues/277 - CollectionAssert.AreEqual(expected: CustomModifiersTestCase.customModifiers[typeNameWithoutSuffix].Reverse(), actual: modopts); + CollectionAssert.AreEqual(expected: Enumerable.Reverse(CustomModifiersTestCase.customModifiers[typeNameWithoutSuffix]), actual: modopts); // ^ see comment about `.Reverse()` above. } @@ -227,7 +227,7 @@ public void ReflectionReturnsCorrectModreqOnReturnTypeForGeneratedType(string ty var modreqs = this.generatedTypes[typeName].GetMethod("Foo").ReturnParameter.GetRequiredCustomModifiers(); Assume.That(modreqs.Length > 0); // If this fails on mono/linux we have to revisit the commits and issues for IL method custom modifiers. https://github.com/castleproject/Core/issues/277 - CollectionAssert.AreEqual(expected: CustomModifiersTestCase.customModifiers[typeNameWithoutSuffix].Reverse(), actual: modreqs); + CollectionAssert.AreEqual(expected: Enumerable.Reverse(CustomModifiersTestCase.customModifiers[typeNameWithoutSuffix]), actual: modreqs); // ^ see comment about `.Reverse()` above. } diff --git a/src/Castle.Core/DynamicProxy/Generators/Emitters/SimpleAST/FieldReference.cs b/src/Castle.Core/DynamicProxy/Generators/Emitters/SimpleAST/FieldReference.cs index 837a02bdfc..ebd0112df1 100644 --- a/src/Castle.Core/DynamicProxy/Generators/Emitters/SimpleAST/FieldReference.cs +++ b/src/Castle.Core/DynamicProxy/Generators/Emitters/SimpleAST/FieldReference.cs @@ -53,7 +53,7 @@ public FieldBuilder FieldBuilder public FieldInfo Reference { - get { return field; } + get { return @field; } } public override void LoadAddressOfReference(ILGenerator gen)