Skip to content

Commit bcfdf5f

Browse files
committed
Add ExcludeFromCodeQL property to build and project
Introduces the ExcludeFromCodeQL property to the build step in the CodeQL workflow and updates the sample project to conditionally include the Windows target framework only when ExcludeFromCodeQL is not set to true. This helps control which frameworks are analyzed during CodeQL runs.
1 parent 019644e commit bcfdf5f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
run: dotnet clean ${{ matrix.solution }}
7575

7676
- name: Build the Blazouter
77-
run: dotnet build ${{ matrix.solution }} -c ${{ matrix.configuration }} -p:UseSharedCompilation=false --no-restore /nowarn:CS0067,CS0108,CS0109,CS0114,CS0169,CS0414,CS0618,CS0649,CS8632,CA1416,NU5104,NETSDK1138,SYSLIB0003
77+
run: dotnet build ${{ matrix.solution }} -c ${{ matrix.configuration }} -p:UseSharedCompilation=false -p:ExcludeFromCodeQL=true --no-restore /nowarn:CS0067,CS0108,CS0109,CS0114,CS0169,CS0414,CS0618,CS0649,CS8632,CA1416,NU5104,NETSDK1138,SYSLIB0003
7878

7979
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
8080
# If this step fails, then you should remove it and run the build manually (see below)

samples/Blazouter.Hybrid.Sample/Blazouter.Hybrid.Sample.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFrameworks>net10.0-android;net10.0-ios;net10.0-maccatalyst</TargetFrameworks>
5-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net10.0-windows10.0.19041.0</TargetFrameworks>
5+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) AND '$(ExcludeFromCodeQL)' != 'true'">$(TargetFrameworks);net10.0-windows10.0.19041.0</TargetFrameworks>
66

77
<!-- Note for MacCatalyst:
88
The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.

0 commit comments

Comments
 (0)