Skip to content

Commit

Permalink
Update dotnet-desktop.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Taiizor committed Nov 15, 2024
1 parent f45c9eb commit bbb0d37
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/dotnet-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,24 @@ jobs:
- name: Setup MSBuild.exe
uses: microsoft/[email protected]

# Restore dependencies
- name: Restore Dependencies
run: dotnet restore ${{ matrix.solution }}
env:
NUGET_CONFIG_PATH: ./NuGet.Config

# Ensure .NET Framework MSBuild is used if required
- name: Validate .NET Framework Compatibility
if: always()
run: |
if (${{ matrix.solution }} -match '\.NETFramework') {
Write-Host "Using MSBuild for .NET Framework."
msbuild ${{ matrix.solution }} /t:Restore /p:Configuration=${{ matrix.configuration }}
} else {
Write-Host "Using .NET Core for Restore."
dotnet restore ${{ matrix.solution }}
}
# Execute all unit tests in the solution
- name: Execute Unit Tests
run: dotnet test ${{ matrix.solution }} -c ${{ matrix.configuration }} /nowarn:CS0067,CS0108,CS0109,CS0114,CS0169,CS0414,CS0649,CA1416,NU5104,NETSDK1138,SYSLIB0003
Expand Down

0 comments on commit bbb0d37

Please sign in to comment.