Analysis runs even though there is no Prepare task or any other sonarqube task in the pipeline

If:
(a) you are using a self-hosted agent, and
(b) a previous analysis pipeline failed without running the end/Run Code Analysis step, and
(c) you then removed the analysis steps from the pipeline…

… it’s possible that some of the clean-up that happens in the end/Run Code Analysis step won’t have completed. Some of our hooks into MSBuild could be still on disk, which would then impact future builds.

If there are any .sonarqube folders under the build agent root folder, delete them then try running the pipeline again.