Skip to content

Commit 294f1c3

Browse files
committed
Add /p:UseSharedCompilation=false to workaround CodeQL bug
1 parent 9b0f08a commit 294f1c3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

PowerShellEditorServices.build.ps1

+5-4
Original file line numberDiff line numberDiff line change
@@ -161,15 +161,16 @@ Task SetupHelpForTests {
161161
}
162162

163163
Task Build FindDotNet, CreateBuildInfo, {
164+
# NOTE: We use /p:UseSharedCompilation=false to work around a bug with CodeQL.
164165
Exec { & dotnet restore $VerbosityArgs }
165-
Exec { & dotnet publish $VerbosityArgs -c $Configuration .\src\PowerShellEditorServices\PowerShellEditorServices.csproj -f $script:NetRuntime.Standard }
166-
Exec { & dotnet publish $VerbosityArgs -c $Configuration .\src\PowerShellEditorServices.Hosting\PowerShellEditorServices.Hosting.csproj -f $script:NetRuntime.PS7 }
166+
Exec { & dotnet publish /p:UseSharedCompilation=false $VerbosityArgs -c $Configuration .\src\PowerShellEditorServices\PowerShellEditorServices.csproj -f $script:NetRuntime.Standard }
167+
Exec { & dotnet publish /p:UseSharedCompilation=false $VerbosityArgs -c $Configuration .\src\PowerShellEditorServices.Hosting\PowerShellEditorServices.Hosting.csproj -f $script:NetRuntime.PS7 }
167168
if (-not $script:IsNix) {
168-
Exec { & dotnet publish $VerbosityArgs -c $Configuration .\src\PowerShellEditorServices.Hosting\PowerShellEditorServices.Hosting.csproj -f $script:NetRuntime.Desktop }
169+
Exec { & dotnet publish /p:UseSharedCompilation=false $VerbosityArgs -c $Configuration .\src\PowerShellEditorServices.Hosting\PowerShellEditorServices.Hosting.csproj -f $script:NetRuntime.Desktop }
169170
}
170171

171172
# Build PowerShellEditorServices.VSCode module
172-
Exec { & dotnet publish $VerbosityArgs -c $Configuration .\src\PowerShellEditorServices.VSCode\PowerShellEditorServices.VSCode.csproj -f $script:NetRuntime.Standard }
173+
Exec { & dotnet publish /p:UseSharedCompilation=false $VerbosityArgs -c $Configuration .\src\PowerShellEditorServices.VSCode\PowerShellEditorServices.VSCode.csproj -f $script:NetRuntime.Standard }
173174
}
174175

175176
Task Test TestServer, TestE2E

0 commit comments

Comments
 (0)