JB IspectCode Error: Referenced project '<project_name>' not found in the solution, it's output assembly wasn't found either.

Hello Jetbrains

We use the command-line tool JB inspectcode in our BuildPolicy pipeline to perform appropriate code analysis. However, we are currently getting the same error for all referenced shared projects:

Referenced project '<project name>' not found in the solution, it's output assembly wasn't found either.

I have already tried to prevent this with e.g. --no-build etc. 

Our folder structure looks like this:

Main Folder

  • Project Folder <= We run JB inspectcode in here
  • Shared Project Folder
  • Shared Project Folder
  • ...

We would like to have these error messages gone for a clean pipeline run and thank you for your help.

6 comments
Comment actions Permalink

Hi Dominik Manser!
You need to pass the same set of msbuild parameters to inspectcode as for your regular build (even with --no-build parameter specified).

0
Comment actions Permalink

We build via docker compose. We don't have any msbuild arguments.

0
Comment actions Permalink

Are these errors the only ones? Are there some other errors related to missed symbols from those mentioned projects? 

0
Comment actions Permalink

There are some errors for every shared project but they are the same as written above and therefore also errors relating to the one above:

Can't resolve reference <project name>: Project '<project name>' or its output assembly was not found

1
Comment actions Permalink

We have made a sample github repository for you to analyse the situation properly: https://github.com/smino-ch/jb-inspectcode 

Maybe this helps to find a solution for those warnings.

1
Comment actions Permalink

Hello Dominik Manser

As I can see from the provided example, you run InspectCode against a project

jb inspectcode ./App.One/App.One/App.One.csproj --output=report.xml --build

This is an unsupported scenario, the tool can be used to analyze the whole solution (the .sln file) only.

0

Please sign in to leave a comment.