codeql-cli-binaries icon indicating copy to clipboard operation
codeql-cli-binaries copied to clipboard

Could not resolve module csharp

Open PulkitMtoag opened this issue 2 years ago • 4 comments

Steps followed to CodeQL Local Setup Installed CodeQl CLI using chocolatey. Installed CodeQL VS code extension. Cloned starter pack with recursive command in a directory. Installed codeql pack download codeql/csharp-all at location where yaml file is present for starter pack image Getting below issue while running a query. image image

PulkitMtoag avatar Mar 29 '23 09:03 PulkitMtoag

Experiencing the same issue. Have you been able to resolve it?

errieman avatar Mar 13 '25 15:03 errieman

@PulkitMtoag Thanks for the choco hint :-) Any news on the resolution? We probably need to somewhere define a path to the packs (~/.codeql/packages)...

mc0re avatar Mar 19 '25 10:03 mc0re

@errieman @mc0re The CodeQL extension should be able to pick up the packs in the ql directory. Is the ql directory populated (i.e., you performed a recursive checkout?).

rvermeulen avatar Mar 19 '25 23:03 rvermeulen

I am facing the same issue on Windows. I am using command line codeql tool. Anybody resolved it?. If so, please share the steps to resolve.

codeql query run c:\temp\query.ql --database=my-csharp-database --output=result.bqrs Compiling query plan for C:\temp\query.ql. ERROR: could not resolve module csharp (C:\temp\query.ql:1,8-14) ERROR: could not resolve type TypeAccess (C:\temp\query.ql:29,6-16) ERROR: 'qname' is not bound to a value. (C:\temp\query.ql:11,28-40)

but I downloaded the module already.

codeql pack download codeql/csharp-all Package specifications to check for download: codeql/csharp-all Did not need to download any packs. Package install location: C:\Users\abc\.codeql\packages Already installed codeql/[email protected] (library)

MukilanP avatar Jun 13 '25 07:06 MukilanP