1111 framework :
1212 - 9.0.x
1313 - 8.0.x
14- - net452
14+ - v4.8.1
15+ - v4.5.2
1516
1617 steps :
1718 # 1. Checkout repository
@@ -20,14 +21,14 @@ jobs:
2021
2122 # 2. Setup .NET SDK (for .NET Core / Modern .NET)
2223 - name : Setup .NET SDK
23- if : " !startsWith(matrix.framework, 'net ')"
24+ if : " !startsWith(matrix.framework, 'v ')"
2425 uses : actions/setup-dotnet@v4
2526 with :
2627 dotnet-version : ${{ matrix.framework }}
2728
2829 # 3. Install NuGet CLI (for .NET Framework)
2930 - name : Install NuGet CLI
30- if : startsWith(matrix.framework, 'net4 ')
31+ if : startsWith(matrix.framework, 'v ')
3132 uses : NuGet/setup-nuget@v2
3233 with :
3334 nuget-version : ' 5.x'
@@ -37,16 +38,16 @@ jobs:
3738 shell : pwsh
3839 run : |
3940 Write-Host "🔄 Restoring dependencies for: ${{ matrix.framework }}"
40- if (!startsWith("${{ matrix.framework }}", "net ")) { dotnet restore }
41- if (startsWith("${{ matrix.framework }}", "net ")) { nuget.exe restore CloudinaryDotNet.sln }
41+ if (!startsWith("${{ matrix.framework }}", "v ")) { dotnet restore }
42+ if (startsWith("${{ matrix.framework }}", "v ")) { nuget.exe restore CloudinaryDotNet.sln }
4243
4344 # 5. Build Solution
4445 - name : Build Solution
4546 shell : pwsh
4647 run : |
4748 Write-Host "⚒️ Building for: ${{ matrix.framework }}"
48- if (!startsWith("${{ matrix.framework }}", "net ")) { dotnet build --configuration Release --no-restore }
49- if (startsWith("${{ matrix.framework }}", "net ")) { msbuild CloudinaryDotNet.sln /p:Configuration=Release }
49+ if (!startsWith("${{ matrix.framework }}", "v ")) { dotnet build --configuration Release --no-restore }
50+ if (startsWith("${{ matrix.framework }}", "v ")) { msbuild CloudinaryDotNet.sln /p:Configuration=Release /p:TargetFrameworkVersion=${{ matrix.framework }} }
5051
5152 # 6. Run before_build.ps1
5253 - name : Run before_build.ps1
@@ -58,13 +59,13 @@ jobs:
5859 shell : pwsh
5960 run : |
6061 Write-Host "🧪 Running Unit Tests for: ${{ matrix.framework }}"
61- if (!startsWith("${{ matrix.framework }}", "net ")) { dotnet test "./CloudinaryDotNet.Tests/CloudinaryDotNet.Tests.csproj" --configuration Release --no-build }
62- if (startsWith("${{ matrix.framework }}", "net ")) { vstest.console.exe "./CloudinaryDotNet.Tests/bin/Release/${{ matrix.framework }}/CloudinaryDotNet.Tests.dll" }
62+ if (!startsWith("${{ matrix.framework }}", "v ")) { dotnet test "./CloudinaryDotNet.Tests/CloudinaryDotNet.Tests.csproj" --configuration Release --no-build }
63+ if (startsWith("${{ matrix.framework }}", "v ")) { vstest.console.exe "./CloudinaryDotNet.Tests/bin/Release/${{ matrix.framework }}/CloudinaryDotNet.Tests.dll" /Framework:${{ matrix.framework }} }
6364
6465 # 8. Run Integration Tests
6566 - name : Run Integration Tests
6667 shell : pwsh
6768 run : |
6869 Write-Host "🧪 Running Integration Tests for: ${{ matrix.framework }}"
69- if (!startsWith("${{ matrix.framework }}", "net ")) { dotnet test "./CloudinaryDotNet.IntegrationTests/CloudinaryDotNet.IntegrationTests.csproj" --configuration Release --no-build }
70- if (startsWith("${{ matrix.framework }}", "net ")) { vstest.console.exe "./CloudinaryDotNet.IntegrationTests/bin/Release/${{ matrix.framework }}/CloudinaryDotNet.IntegrationTests.dll" }
70+ if (!startsWith("${{ matrix.framework }}", "v ")) { dotnet test "./CloudinaryDotNet.IntegrationTests/CloudinaryDotNet.IntegrationTests.csproj" --configuration Release --no-build }
71+ if (startsWith("${{ matrix.framework }}", "v ")) { vstest.console.exe "./CloudinaryDotNet.IntegrationTests/bin/Release/${{ matrix.framework }}/CloudinaryDotNet.IntegrationTests.dll" /Framework:${{ matrix.framework }} }
0 commit comments