if the build agents do not have MSBuild v16.0 installed, then the build will throw the following warning.
CSC : warning CS8032: An instance of analyzer NServiceBus.NewRelic.Analyzer.NServiceBusNewRelicAnalyzer cannot be created from C:\BuildAgent\work\9b7caaa76a57f65c\packages\NServiceBus.NewRelic.Analyzer.1.0.1\analyzers\dotnet\cs\NServiceBus.NewRelic.Analyzer.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=3.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [C:\BuildAgent\work\9b7caaa76a57f65c\TestAnalysisBuild\TestAnalysisBuild.csproj]
RUN ["choco", "install", "visualstudio2019buildtools", "-y", "--package-parameters", "--add Microsoft.VisualStudio.Workload.MSBuildTools"]
RUN ["choco", "install", "visualstudio2019buildtools", "-y", "--package-parameters", "--add Microsoft.VisualStudio.Component.Roslyn.Compiler"]
Either of the above commands worked.