Is possible to use manual scan for csharp?

Our csharp solution is very complex (200+ projects) and we would like to scan manually in separate pipelines… Is it possible to use the “CLI” without using MSBuild/Roslyn scanner?

The following task will produce just JS/html analysis, not the csharp one!

- task: SonarCloudPrepare@1
  inputs:
    SonarCloud: 'SonarCloudConnection'
    organization: 'regola'
    scannerMode: 'CLI'
    configMode: 'manual'
    cliProjectKey: 'regola_Unique'
    cliProjectName: 'Unique'
    cliProjectVersion: '$(version)'
    cliSources: '_Platform'
  • ALM used: Azure DevOps
  • CI system used: Azure DevOps
  • Languages: C#

Hi @24mu13 , welcome to the community.

You can use the Scanner for .NET in standalone mode, see the doc here.

HTH,
Mickaël

Thank you Mickaël,

As documentation you linked states “between the begin and end steps, you need to build your project”, but in our case this means 2+ hours build-time.

Instead, manual scanning using CLI for html/js for example is possible and quicker: we would like to use CLI for csharp also.

Any clue about that?

Thanks,

The main reason about that is that we hook up in the build phase too, the things that scanner CLI doesn’t do. It means that the analysis of C# files is done part of the build step, so you would expect some increase on build time, especially on large projects.

Mickaël

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.