diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 3d4c4e1..b9b27c0 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -8,7 +8,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - dotnet: [2.1.802] + dotnet: [ '6.0.x' ] os: [ubuntu-latest, windows-latest, macOS-latest] steps: diff --git a/.github/workflows/dotnet48.yml b/.github/workflows/dotnet48.yml new file mode 100644 index 0000000..8c7980e --- /dev/null +++ b/.github/workflows/dotnet48.yml @@ -0,0 +1,30 @@ +name: Build CrossComple .net core/.net framework Windows + +on: [push] + +jobs: + build: + name: Test Windows .net Framework Only + runs-on: windows-2019 + steps: + + - uses: actions/checkout@v2 + + - name: Setup NuGet + uses: NuGet/setup-nuget@v1.2.0 + + - name: setup-msbuild + uses: microsoft/setup-msbuild@v1.1 + + - name: Restore Packages + run: nuget restore Dynamitey.sln + - name: Build solution + run: msbuild Dynamitey.sln -t:rebuild -property:Configuration=Release + - name: Run vstests + uses: microsoft/vstest-action@v1.0.0 + with: + testAssembly: Tests.dll + searchFolder: .\Tests\bin\Release\*\ + runInParallel: true + otherConsoleOptions: /TestCaseFilter:"(TestCategory!=Performance)" + platform: x64 diff --git a/Dynamitey.sln b/Dynamitey.sln index d54a794..3023843 100644 --- a/Dynamitey.sln +++ b/Dynamitey.sln @@ -1,16 +1,21 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26228.9 +# Visual Studio Version 17 +VisualStudioVersion = 17.7.34202.233 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{691EBA79-CAA4-4670-BC8B-4537F990ADBF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{C33F07DB-7ACB-4081-92C2-BB739CB605C0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests", "Tests\Tests.csproj", "{C33F07DB-7ACB-4081-92C2-BB739CB605C0}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SupportLibrary", "SupportLibrary\SupportLibrary.csproj", "{18E19833-D47E-4A7F-AE64-31E28FEF8728}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SupportLibrary", "SupportLibrary\SupportLibrary.csproj", "{18E19833-D47E-4A7F-AE64-31E28FEF8728}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dynamitey", "Dynamitey\Dynamitey.csproj", "{8902AFBA-4ACA-4880-B606-ADEC6BB21A1B}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3535FA34-121F-4DEB-97C5-4A90E54AEE94}" + ProjectSection(SolutionItems) = preProject + Version.props = Version.props + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/Dynamitey.sln.DotSettings b/Dynamitey.sln.DotSettings index 61d3c50..3719ac7 100644 --- a/Dynamitey.sln.DotSettings +++ b/Dynamitey.sln.DotSettings @@ -1,6 +1,7 @@  DB SL + True <data><IncludeFilters /><ExcludeFilters /></data> <data /> True diff --git a/Dynamitey/DynamicObjects/ExtensionToInstanceProxy.cs b/Dynamitey/DynamicObjects/ExtensionToInstanceProxy.cs index 2995c25..a0097f5 100644 --- a/Dynamitey/DynamicObjects/ExtensionToInstanceProxy.cs +++ b/Dynamitey/DynamicObjects/ExtensionToInstanceProxy.cs @@ -293,7 +293,22 @@ public override bool TryInvokeMember(System.Dynamic.InvokeMemberBinder binder, o }catch(RuntimeBinderException) { - types = null; + try + { + IList typeList = Dynamic.InvokeGet(binder, + "TypeArguments"); + if (typeList != null) + { + + types = typeList.ToArray(); + + } + + } + catch (RuntimeBinderException) + { + types = null; + } } var name=InvokeMemberName.Create; diff --git a/Dynamitey/Dynamitey.csproj b/Dynamitey/Dynamitey.csproj index eab3d20..b56d710 100644 --- a/Dynamitey/Dynamitey.csproj +++ b/Dynamitey/Dynamitey.csproj @@ -1,8 +1,7 @@  - netstandard2.0;netstandard1.5;net40;portable-net45+sl5+win8+wp8 - netstandard2.0 + netstandard2.0;net40 (pronounced dyna-mighty) flexes DLR muscle to do meta-mazing things in .net Ekon Benefits @@ -23,11 +22,6 @@ - - - - - @@ -36,10 +30,6 @@ - - - - @@ -57,9 +47,6 @@ - - - @@ -79,10 +66,5 @@ - - - - - \ No newline at end of file diff --git a/SupportLibrary/SupportLibrary.csproj b/SupportLibrary/SupportLibrary.csproj index 12d51c4..6e9c9fe 100644 --- a/SupportLibrary/SupportLibrary.csproj +++ b/SupportLibrary/SupportLibrary.csproj @@ -1,11 +1,11 @@  - netstandard1.0 + netstandard2.0 - + diff --git a/Tests/DynamicObjects.cs b/Tests/DynamicObjects.cs index bc04615..a7d1c98 100644 --- a/Tests/DynamicObjects.cs +++ b/Tests/DynamicObjects.cs @@ -573,7 +573,7 @@ public void TestRecorder() } -#if !NETCOREAPP2_0 +#if !NET6_0_OR_GREATER [Test] public void TestCodeDomLateTypeBind() diff --git a/Tests/Invoke.cs b/Tests/Invoke.cs index 546a1d8..7ef3549 100644 --- a/Tests/Invoke.cs +++ b/Tests/Invoke.cs @@ -16,7 +16,7 @@ namespace Dynamitey.Tests { public class Invoke:AssertionHelper { - [TestFixtureTearDown] + [OneTimeTearDown] public void DestroyCaches() { Dynamic.ClearCaches(); diff --git a/Tests/Linq.cs b/Tests/Linq.cs index 137ba77..c13713a 100644 --- a/Tests/Linq.cs +++ b/Tests/Linq.cs @@ -6,10 +6,9 @@ using System.Text; using System.Threading.Tasks; using NUnit.Framework; -#if !NETCOREAPP2_0 using IronPython.Hosting; using Microsoft.Scripting; -#endif + namespace Dynamitey.Tests { [TestFixture] @@ -37,7 +36,7 @@ public void MoreGenericsDynamicLinq() Assert.AreEqual(expected, actual); } -#if !NETCOREAPP2_0 + private dynamic RunPythonHelper(object linq, string code) { @@ -53,15 +52,7 @@ private dynamic RunPythonHelper(object linq, string code) tCompiled.Execute(tScope); return tScope.GetVariable("result"); } -#else - private dynamic RunPythonHelper(object linq, string code) - { - - Assert.Ignore("Iron Python Doesn't work on .net core"); - return new object(); - } -#endif diff --git a/Tests/Program.cs b/Tests/Program.cs deleted file mode 100644 index 088306b..0000000 --- a/Tests/Program.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace Dynamitey.Tests -{ -#if !NETCOREAPP2_0 - public class Program - { - public static void Main() - { - - } - } -#endif -} \ No newline at end of file diff --git a/Tests/SpeedTest.cs b/Tests/SpeedTest.cs index 3552b1d..8158faa 100644 --- a/Tests/SpeedTest.cs +++ b/Tests/SpeedTest.cs @@ -13,7 +13,7 @@ namespace Dynamitey.Tests [Category("Performance")] public class SpeedTest:AssertionHelper { - [TestFixtureSetUp] + [OneTimeSetUp] public void WarmUpDlr() { Dynamic.InvokeMember(1, "ToString"); diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index 20ccaef..945d5f9 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -1,29 +1,25 @@  - netcoreapp2.0;net462 - netcoreapp2.0 - Exe - false + net6;net48 + false - + - - - - - - + + + + + - - - - - + + + + diff --git a/Version.props b/Version.props index 568a0ef..6d87896 100644 --- a/Version.props +++ b/Version.props @@ -1,5 +1,5 @@ - 2.0.10 + 3.0.2 \ No newline at end of file