Skip to content

CodeQL failed to compile C# program based on Unity #15807

@wwwjwww

Description

@wwwjwww

I want to try codeQL on the Unity program of its C# code in its assets folder. I could execute "msbuild xxx.sln" in my local environment. However, when I try to build codeql database using: codeql database create trial-database --language=csharp --command="msbuild xxx.sln", it reports: CodeQL detected code written in C# but could not process any of it. This can occur if the specified build commands failed to compile or process any code.

  • Confirm that there is some source code for the specified language in the project.
  • For codebases written in Go, JavaScript, TypeScript, and Python, do not specify
    an explicit --command.
  • For other languages, the --command must specify a "clean" build which compiles
    all the source code files without reusing existing build artefacts.

Is it because codeql doesn't support analyzing C# code in a Unity program?

Metadata

Metadata

Assignees

Labels

C#questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions