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.
Please sign in to leave a comment.
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).
We build via docker compose. We don't have any msbuild arguments.
Are these errors the only ones? Are there some other errors related to missed symbols from those mentioned projects?
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
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.
Hello Dominik Manser
As I can see from the provided example, you run InspectCode against a project
This is an unsupported scenario, the tool can be used to analyze the whole solution (the .sln file) only.