We have a problem with sonar scanner version “5.4.0”.
When we use libraries that use source generators (like https://github.com/mostmand/Cloneable) our build fails when we run the SonarQubePrepare task before the build in the azure pipeline, when we do not use the SonarQube task the build works fine.
It looks like SonarQube somehow blocks the code to be generated, because we get this error messages in the build:
Error CS0246: The type or namespace name ‘Cloneable’ could not be found (are you missing a using directive or an assembly reference?)
Error CS0246: The type or namespace name ‘Cloneable’ could not be found (are you missing a using directive or an assembly reference?)
Error CS0246: The type or namespace name ‘CloneableAttribute’ could not be found (are you missing a using directive or an assembly reference?)
Error CS0246: The type or namespace name ‘Cloneable’ could not be found (are you missing a using directive or an assembly reference?)
thanks for the response!
We used the SonarScanner for Azure DevOps where the newest version is 5.4.0, sorry for the misunderstanding.
I now tried to use the SonarScanner for .NET with the newest version but the problem still remains