mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Docs: No longer mention required /p:UseSharedCompilation=false
This commit is contained in:
2
.github/workflows/csv-coverage-metrics.yml
vendored
2
.github/workflows/csv-coverage-metrics.yml
vendored
@@ -55,7 +55,7 @@ jobs:
|
||||
DATABASE="${{ runner.temp }}/csharp-database"
|
||||
PROJECT="${{ runner.temp }}/csharp-project"
|
||||
dotnet new classlib --language=C# --output="$PROJECT"
|
||||
codeql database create "$DATABASE" --language=csharp --source-root="$PROJECT" --command 'dotnet build /t:rebuild csharp-project.csproj /p:UseSharedCompilation=false'
|
||||
codeql database create "$DATABASE" --language=csharp --source-root="$PROJECT" --command 'dotnet build /t:rebuild csharp-project.csproj'
|
||||
- name: Capture coverage information
|
||||
run: |
|
||||
DATABASE="${{ runner.temp }}/csharp-database"
|
||||
|
||||
@@ -299,7 +299,7 @@ namespace Semmle.Autobuild.Cpp.Tests
|
||||
{
|
||||
Actions.RunProcess[@"cmd.exe /C nuget restore C:\Project\test.sln -DisableParallelProcessing"] = 1;
|
||||
Actions.RunProcess[@"cmd.exe /C C:\Project\.nuget\nuget.exe restore C:\Project\test.sln -DisableParallelProcessing"] = 0;
|
||||
Actions.RunProcess[@"cmd.exe /C CALL ^""C:\Program Files ^(x86^)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat^"" && set Platform=&& type NUL && C:\odasa\tools\odasa index --auto msbuild C:\Project\test.sln /p:UseSharedCompilation=false /t:rebuild /p:Platform=""x86"" /p:Configuration=""Release"" /p:MvcBuildViews=true"] = 0;
|
||||
Actions.RunProcess[@"cmd.exe /C CALL ^""C:\Program Files ^(x86^)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat^"" && set Platform=&& type NUL && C:\odasa\tools\odasa index --auto msbuild C:\Project\test.sln /t:rebuild /p:Platform=""x86"" /p:Configuration=""Release"" /p:MvcBuildViews=true"] = 0;
|
||||
Actions.RunProcessOut[@"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -prerelease -legacy -property installationPath"] = "";
|
||||
Actions.RunProcess[@"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -prerelease -legacy -property installationPath"] = 1;
|
||||
Actions.RunProcess[@"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -prerelease -legacy -property installationVersion"] = 0;
|
||||
|
||||
@@ -210,11 +210,10 @@ commands that you can specify for compiled languages.
|
||||
|
||||
- C# project built using ``dotnet build``::
|
||||
|
||||
For C# projects using either `dotnet build` or `msbuild`, you should specify `/p:UseSharedCompilation=false`
|
||||
in the build command. It is also a good idea to add `/t:rebuild` to ensure that all code will be built (code
|
||||
that is not built will not be included in the CodeQL database):
|
||||
It is a good idea to add `/t:rebuild` to ensure that all code will be built, or do a
|
||||
prior `dotnet clean` (code that is not built will not be included in the CodeQL database):
|
||||
|
||||
codeql database create csharp-database --language=csharp --command='dotnet build /p:UseSharedCompilation=false /t:rebuild'
|
||||
codeql database create csharp-database --language=csharp --command='dotnet build /t:rebuild'
|
||||
|
||||
- Go project built using the ``CODEQL_EXTRACTOR_GO_BUILD_TRACING=on`` environment variable::
|
||||
|
||||
@@ -349,8 +348,7 @@ The following example shows how you could use indirect build tracing in an Azure
|
||||
- task: VSBuild@1
|
||||
inputs:
|
||||
solution: '**/*.sln'
|
||||
# Disable MSBuild shared compilation for C# builds.
|
||||
msbuildArgs: /p:OutDir=$(Build.ArtifactStagingDirectory) /p:UseSharedCompilation=false
|
||||
msbuildArgs: /p:OutDir=$(Build.ArtifactStagingDirectory)
|
||||
platform: Any CPU
|
||||
configuration: Release
|
||||
# Execute a clean build, in order to remove any existing build artifacts prior to the build.
|
||||
|
||||
Reference in New Issue
Block a user