Skip to content

Fix build warnings #1905

Fix build warnings

Fix build warnings #1905

Workflow file for this run

name: .NET Tests
on:
push:
branches: [ "main" ]
paths:
- '**.cs'
- '**.csproj'
- '**.sln'
- '.github/workflows/dotnet-test.yml'
pull_request:
branches: [ "main" ]
paths:
- '**.cs'
- '**.csproj'
- '**.sln'
- '.github/workflows/dotnet-test.yml'
workflow_dispatch:
jobs:
test-codebase:
runs-on: windows-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v6
with:
fetch-depth: 0
# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
- name: Install Windows SDK UAP platform
shell: pwsh
run: |
# CsWinRT in WindowsPackageManager.Interop requires UAP 10.0.19041.0 platform metadata
$VsWhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$VsInstaller = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vs_installer.exe"
$InstallPath = & $VsWhere -latest -property installationPath
& $VsInstaller modify --installPath $InstallPath `
--add Microsoft.VisualStudio.Component.UWP.Support `
--add Microsoft.VisualStudio.Component.Windows10SDK.19041 `
--quiet --norestart --nocache | Out-Default
Write-Host "Windows SDK UAP platform installed"
# - name: Install WinGet
# uses: Cyberboss/install-winget@v1
- name: Install dependencies
working-directory: src
run: dotnet restore UniGetUI.sln
# - name: Test build
# working-directory: src
# run: dotnet build --configuration Release
- name: Run Tests
working-directory: src
run: dotnet test UniGetUI.sln --no-restore --verbosity q --nologo