Could you confirm that a non-analysis command line build works as expected please?
Also, please provide us with diagnostic logs for the MSBuild.
FYI this old post describes a problem with analyzers not being able to find dependencies. In that case the problem was that different versions of the dependent assembly were being used.