Skip to content

Commit b524a61

Browse files
authored
Merge pull request #7368 from github/hvitved-patch-1
Update creating-codeql-databases.rst
2 parents 85ff57b + 8d607e6 commit b524a61

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

docs/codeql/codeql-cli/creating-codeql-databases.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,13 @@ commands that you can specify for compiled languages.
208208

209209
codeql database create cpp-database --language=cpp --command=make
210210

211-
- C# project built using ``dotnet build`` (.NET Core 3.0 or later)::
211+
- C# project built using ``dotnet build``::
212212

213-
codeql database create csharp-database --language=csharp --command='dotnet build /t:rebuild'
213+
For C# projects using either `dotnet build` or `msbuild`, you should specify `/p:UseSharedCompilation=false`
214+
in the build command. It is also a good idea to add `/t:rebuild` to ensure that all code will be built (code
215+
that is not built will not be included in the CodeQL database):
214216

215-
On Linux and macOS (but not Windows), you need to disable shared compilation when building C# projects
216-
with .NET Core 2 or earlier, so expand the command to::
217-
218-
codeql database create csharp-database --language=csharp --command='dotnet build /p:UseSharedCompilation=false /t:rebuild'
217+
codeql database create csharp-database --language=csharp --command='dotnet build /p:UseSharedCompilation=false /t:rebuild'
219218

220219
- Go project built using the ``COEQL_EXTRACTOR_GO_BUILD_TRACING=on`` environment variable::
221220

0 commit comments

Comments
 (0)