sonar-scanner-msbuild icon indicating copy to clipboard operation
sonar-scanner-msbuild copied to clipboard

Proxy setup for MSBuild SonarScanner not sufficient

Open SupJoeeeeeey opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe. The proxy setup mentioned on SonarQube is not sufficient for anyone who would use the scanner behind a proxy. If we only set up the JVM arguments, you will probably get the network errors inside the MSBuild wrapper because the dotnet wrapper also needs the proxy configuration.

Although there was one line at the bottom mentioning that we still need additional variables to get the dotnet wrapper running, but all the variables specified there (e.g.: HTTP_PROXY) are only used by dotnet since .net 5.0. Any dotnet versions before that will need other configurations to make it work.

Describe the solution you'd like Document improvements are needed to include the minimum configuration needed for using the MSBuild sonar scanner with different dotnet/dotnet core/dotnet framework. E.g.:

<defaultProxy  
  enabled="True|False"  
  useDefaultCredentials="True|False">  
    <bypasslist>...</bypasslist>  
    <proxy>...</proxy>  
    <module>...</module>  
</defaultProxy>

This is for dotnet 4.6, add the above configuration in your app.exe.config file so that your application will use the proxy specified.

Describe alternatives you've considered N.A

Additional context

  1. The current doc did not mention the configuration for dotnet only applies to certain versions. image
  2. DefaultProxy specified that environment variables like HTTP_PROXY only applies to dotnet 5, 6, Core 3.0, Core 3.1.
  3. ProxyConfiguration specifies how to set up proxy for previous dotnet framework applications.

SupJoeeeeeey avatar Dec 13 '21 06:12 SupJoeeeeeey