revert .csproj #19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: dotnet-ci | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup .NET SDK | |
| uses: actions/setup-dotnet@v4 # 升级到最新版setup-dotnet,确保兼容性 | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Restore dependencies | |
| run: dotnet restore ./src/c#/GeneralUpdate.sln # 确保所有项目依赖还原 | |
| - name: Check AOT support (Client app) | |
| run: | | |
| dotnet publish ./src/c#/GeneralUpdate.Client/GeneralUpdate.Client.csproj ` | |
| -c Release ` | |
| -r win-x64 ` | |
| /p:PublishAot=true ` # 使用/p:替代-p:,兼容PowerShell参数解析 | |
| continue-on-error: true # 允许失败,后续判断结果 | |
| - name: Analyze AOT result | |
| run: | | |
| if ($LASTEXITCODE -eq 0) { | |
| Write-Host "✅ GeneralUpdate.Client 支持AOT编译" | |
| } else { | |
| Write-Host "❌ GeneralUpdate.Client 不支持AOT编译,请检查错误日志" | |
| exit 1 # 可选:让Workflow失败以提示问题 | |
| } |