From 8915fd87aed445fecaff61d9416c91c0d0543c69 Mon Sep 17 00:00:00 2001 From: Jay Tuley Date: Fri, 15 Nov 2024 22:14:30 -0600 Subject: [PATCH 1/6] Update Compiler versions and #ifDef --- ImpromptuInterface/src/EmitProxy/ActLikeMaker.cs | 4 ++-- ImpromptuInterface/src/EmitProxy/BuildProxy.cs | 4 ++-- .../UnitTestImpromptuInterface.csproj | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ImpromptuInterface/src/EmitProxy/ActLikeMaker.cs b/ImpromptuInterface/src/EmitProxy/ActLikeMaker.cs index f81152c..3e0f5f6 100644 --- a/ImpromptuInterface/src/EmitProxy/ActLikeMaker.cs +++ b/ImpromptuInterface/src/EmitProxy/ActLikeMaker.cs @@ -15,7 +15,7 @@ namespace ImpromptuInterface.Build { -#if NET40 +#if NETFRAMEWORK public class SaveableActLikeMaker : ActLikeMaker { public SaveableActLikeMaker(AssemblyBuilderAccess access, string assemblyName = null) : base(access, assemblyName) @@ -1775,7 +1775,7 @@ private static void GenerateAssembly(string name, AssemblyBuilderAccess access, mb = -#if NET40 +#if NETFRAMEWORK access.HasFlag(AssemblyBuilderAccess.Save) ? ab.DefineDynamicModule("MainModule", $"{tName.Name}.dll") : #endif diff --git a/ImpromptuInterface/src/EmitProxy/BuildProxy.cs b/ImpromptuInterface/src/EmitProxy/BuildProxy.cs index 3de34ec..32932c9 100644 --- a/ImpromptuInterface/src/EmitProxy/BuildProxy.cs +++ b/ImpromptuInterface/src/EmitProxy/BuildProxy.cs @@ -22,7 +22,7 @@ namespace ImpromptuInterface.Build using System.Reflection.Emit; -#if NET40 +#if NETFRAMEWORK internal static class CompatHelper { public static Type GetTypeInfo(this Type type) => type; @@ -50,7 +50,7 @@ public static class BuildProxy public static ActLikeMaker CollectableProxyMaker() => new ActLikeMaker(AssemblyBuilderAccess.RunAndCollect); -#if NET40 +#if NETFRAMEWORK public static SaveableActLikeMaker SaveableProxyMaker(string assemblyName = null) => new SaveableActLikeMaker(AssemblyBuilderAccess.RunAndSave, assemblyName); #endif } diff --git a/Tests/UnitTestImpromptuInterface/UnitTestImpromptuInterface.csproj b/Tests/UnitTestImpromptuInterface/UnitTestImpromptuInterface.csproj index c5fe914..a84c610 100644 --- a/Tests/UnitTestImpromptuInterface/UnitTestImpromptuInterface.csproj +++ b/Tests/UnitTestImpromptuInterface/UnitTestImpromptuInterface.csproj @@ -1,6 +1,6 @@  - net6;net47 + net8.0;net47 false From 524a3db3d4f96ec8c697a7c4e3c7218e5e08afe5 Mon Sep 17 00:00:00 2001 From: Jay Tuley Date: Fri, 15 Nov 2024 22:23:44 -0600 Subject: [PATCH 2/6] Update build system --- .github/workflows/dotnet.yml | 6 ++-- .github/workflows/dotnet48.yml | 30 ++++++++++---------- ImpromptuInterface.sln | 1 + ImpromptuInterface/ImpromptuInterface.csproj | 6 ++++ Version.props | 2 +- 5 files changed, 26 insertions(+), 19 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 8751fe4..4f71f78 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -8,8 +8,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - dotnet: [ '6.0.x' ] - os: [ubuntu-latest, windows-latest, macOS-latest] + dotnet: [ '8.0.x' ] + os: [ubuntu-latest, macOS-latest] steps: - uses: actions/checkout@v1 @@ -20,4 +20,4 @@ jobs: - name: Build with dotnet core run: dotnet build --configuration Release - name: Tests - run: dotnet test Tests/UnitTestImpromptuInterface/UnitTestImpromptuInterface.csproj --configuration Release --no-build --no-restore --filter=TestCategory!=Performance + run: dotnet test DotNetDBF.Test/DotNetDBF.Test.csproj --configuration Release --no-build --no-restore \ No newline at end of file diff --git a/.github/workflows/dotnet48.yml b/.github/workflows/dotnet48.yml index 7f8e94f..9b6ba8f 100644 --- a/.github/workflows/dotnet48.yml +++ b/.github/workflows/dotnet48.yml @@ -1,30 +1,30 @@ -name: Build CrossComple .net core/.net framework Windows +name: .net framework Windows on: [push] jobs: build: name: Test Windows .net Framework Only - runs-on: windows-2019 + runs-on: windows-2022 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 + - uses: actions/checkout@v4 + - uses: NuGet/setup-nuget@v2 + - uses: microsoft/setup-msbuild@v2 + with: + dotnet-version: 4.7.2 + + - name: Restore run: nuget restore ImpromptuInterface.sln - - name: Build solution + - name: Build run: msbuild ImpromptuInterface.sln -t:rebuild -property:Configuration=Release - - name: Run vstests - uses: microsoft/vstest-action@v1.0.0 + - name: Test + uses: josepho0918/vstest-action@0e887de8dcfab5ce3eecaf4ad6320bb9b3ecf633 with: testAssembly: UnitTestImpromptuInterface.dll searchFolder: .\Tests\UnitTestImpromptuInterface\bin\Release\*\ runInParallel: true otherConsoleOptions: /TestCaseFilter:"(TestCategory!=Performance)" platform: x64 + - name: Publish + run: + dotnet nuget push '${{ github.workspace }}\publish\*.nupkg' --source https://nuget.pkg.github.com/ekonbenefits/index.json --api-key ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/ImpromptuInterface.sln b/ImpromptuInterface.sln index b87b509..dbc8ff7 100644 --- a/ImpromptuInterface.sln +++ b/ImpromptuInterface.sln @@ -14,6 +14,7 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{87291621-4395-4EFE-A070-9A007B26EF6D}" ProjectSection(SolutionItems) = preProject Version.props = Version.props + Readme.md = Readme.md EndProjectSection EndProject Global diff --git a/ImpromptuInterface/ImpromptuInterface.csproj b/ImpromptuInterface/ImpromptuInterface.csproj index 37262fb..e681edd 100644 --- a/ImpromptuInterface/ImpromptuInterface.csproj +++ b/ImpromptuInterface/ImpromptuInterface.csproj @@ -27,4 +27,10 @@ + + + \ No newline at end of file diff --git a/Version.props b/Version.props index 0421ff3..e1fcc38 100644 --- a/Version.props +++ b/Version.props @@ -1,5 +1,5 @@ - 8.0.4 + 8.0.5 \ No newline at end of file From 64572269d10ae09a821c49ef1446ad5c4ac074ce Mon Sep 17 00:00:00 2001 From: Jay Tuley Date: Fri, 15 Nov 2024 22:25:39 -0600 Subject: [PATCH 3/6] fix copy paste build error --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 4f71f78..11d85c1 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -20,4 +20,4 @@ jobs: - name: Build with dotnet core run: dotnet build --configuration Release - name: Tests - run: dotnet test DotNetDBF.Test/DotNetDBF.Test.csproj --configuration Release --no-build --no-restore \ No newline at end of file + run: dotnet test Tests/UnitTestImpromptuInterface/UnitTestImpromptuInterface.csproj --configuration Release --no-build --no-restore --filter=TestCategory!=Performance \ No newline at end of file From 943531203f5f80b5d9429a2672fcd18b51af6314 Mon Sep 17 00:00:00 2001 From: Jay Tuley Date: Fri, 15 Nov 2024 22:28:51 -0600 Subject: [PATCH 4/6] Update dotnet.yml --- .github/workflows/dotnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 11d85c1..8102e8d 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -12,9 +12,9 @@ jobs: os: [ubuntu-latest, macOS-latest] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Setup .NET Core - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ matrix.dotnet }} - name: Build with dotnet core From f26d4d440489d3d48f9a75df27640162e3461eec Mon Sep 17 00:00:00 2001 From: Jay Tuley Date: Fri, 15 Nov 2024 22:37:08 -0600 Subject: [PATCH 5/6] Fix some warnings --- ImpromptuInterface/ImpromptuInterface.csproj | 8 ++++++-- Tests/UnitTestImpromptuInterface/Support/Helper.cs | 5 ++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ImpromptuInterface/ImpromptuInterface.csproj b/ImpromptuInterface/ImpromptuInterface.csproj index e681edd..709b477 100644 --- a/ImpromptuInterface/ImpromptuInterface.csproj +++ b/ImpromptuInterface/ImpromptuInterface.csproj @@ -8,8 +8,8 @@ jbtule Copyright © Contributors 2010-2017 https://github.com/ekonbenefits/impromptu-interface - https://github.com/ekonbenefits/impromptu-interface/blob/master/License.txt - https://raw.githubusercontent.com/ekonbenefits/impromptu-interface/master/graphics/ImpromptuInterface-Icon.png + Apache-2.0 + ImpromptuInterface-Icon.png ducktyping duckcasting dynamic .net40 Silverlight proxy impromptu interface reflection dlr currying True True @@ -17,6 +17,7 @@ True + @@ -27,6 +28,9 @@ + + + Date: Fri, 15 Nov 2024 22:39:16 -0600 Subject: [PATCH 6/6] add preview to suffix when CI building --- Version.props | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Version.props b/Version.props index e1fcc38..e930509 100644 --- a/Version.props +++ b/Version.props @@ -1,5 +1,6 @@ - 8.0.5 + 8.0.6 + preview$(GITHUB_RUN_NUMBER) \ No newline at end of file