SonarCloud Analysis build failed with error #CS0234

We are able to build using Visual Studio 17, however SonarCloud analysis build failed with error # CS0234,

Extracts from logs,
[error]Common\Common\FirstClose.Common.Entities\PointFile.cs(6,18): Error CS0234: The type or namespace name ‘Mvc’ does not exist in the namespace ‘System.Web’ (are you missing an assembly reference?)

Please find the attached screenshot for reference,

hi @syed , welcome to our community!

This is a generic compiler error, see Microsoft cs0234

I understand the build works from VS, but does it work from command line?

Yes Andrei, the build works from VS also it does work with command line with on local system. the issue is when we commit changes then it is not working on SonarCloud and build failed with error # CS0234

how are you integrating with sonarcloud?
do you use a specific product for Continuous Integration?
what commands are you using?

integrating via piplines build; CI - none, all manual; Commands - via website

so from what I understand, the build runs locally but it fails on Azure Pipelines

This is not due to sonarcloud. It seems you have to fix the Azure Pipelines config

Hi @syed , when you run from the commandline, do you run it in your source folder ?

If yes, can you try run this same msbuild commandline from the folder where the build agent is downloading sources on ? (The one like agent_work\xx\s)

Have you tried to run your pipeline without any SonarCloud task inside ?

Thanks.