File tree Expand file tree Collapse file tree 2 files changed +24
-3
lines changed
Expand file tree Collapse file tree 2 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -38,11 +38,15 @@ jobs:
3838 - name : Checkout repository
3939 uses : actions/checkout@v3
4040
41+ - name : Update TargetFrameworks to net9.0
42+ shell : pwsh
43+ run : |
44+ .\.github\workflows\update-target-frameworks.ps1 -newTarget "net9.0"
45+
4146 - name : Setup .NET
4247 uses : actions/setup-dotnet@v4
4348 with :
44- dotnet-version : 10.0.x
45- dotnet-quality : preview
49+ dotnet-version : 9.0.x
4650
4751 - name : Initialize CodeQL
4852 uses : github/codeql-action/init@v3
5256 - if : matrix.language == 'csharp'
5357 name : Manually build CSharp on .NET
5458 run : |
55- dotnet build Microsoft.FluentUI.sln
59+ dotnet build Microsoft.FluentUI.sln -c Release
5660
5761 - name : Perform CodeQL Analysis
5862 uses : github/codeql-action/analyze@v3
Original file line number Diff line number Diff line change 1+ param (
2+ [Parameter (Mandatory = $true )]
3+ [string ]$newTarget
4+ )
5+
6+ Write-Host " Updating TargetFrameworks to $newTarget ..."
7+
8+ Get-ChildItem - Recurse - Filter * .csproj | ForEach-Object {
9+ $content = Get-Content $_.FullName - Raw
10+ if ($content -match ' <TargetFrameworks>.*?</TargetFrameworks>' ) {
11+ $content = $content -replace ' <TargetFrameworks>.*?</TargetFrameworks>' , " <TargetFrameworks>$newTarget </TargetFrameworks>"
12+ Set-Content - Path $_.FullName - Value $content - NoNewline
13+ Write-Host " Updated $ ( $_.FullName ) "
14+ }
15+ }
16+
17+ Write-Host " Done updating TargetFrameworks."
You can’t perform that action at this time.
0 commit comments