# Csharp in SonarCloud is not recognized nor analysed

**URL:** <https://community.sonarsource.com/t/csharp-in-sonarcloud-is-not-recognized-nor-analysed/70802>\
**Category:** SonarQube Cloud\
**Tags:** csharp, sonarqube-cloud\
**Created:** [September 1, 2022, 10:40am UTC](https://community.sonarsource.com/t/csharp-in-sonarcloud-is-not-recognized-nor-analysed/70802 "2022-09-01T10:40:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeromeLac](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@jeromeLac](https://community.sonarsource.com/u/jeromeLac)\
**Post date:** [September 1, 2022, 10:40am UTC](https://community.sonarsource.com/t/csharp-in-sonarcloud-is-not-recognized-nor-analysed/70802/1 "2022-09-01T10:40:19Z")

</div>

Template for a good new topic, formatted with [Markdown](https://commonmark.org/help/):

- ALM CI used : Azure DevOps
- Scanner command used when applicable : Azure devops YAML command  
_- task: SonarCloudAnalyze@1_
- Languages of the repository : c #
- Error observed : CS code is not recognise and analysed  
 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/f/4/f43b60cfc3304e5535e4caefe02c5c895bade75a.png)

Langage settings is prperly set

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/0/9/09771fb4a681b080df7026080e6033fa03cdc487.png)

→ Why? How to force SonarCloud to analysed CS code?

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [September 1, 2022, 6:06pm UTC](https://community.sonarsource.com/t/csharp-in-sonarcloud-is-not-recognized-nor-analysed/70802/2 "2022-09-01T18:06:14Z")

</div>

Hi,

Are you using automatic analysis? It doesn’t support C#.

You’ll need to set up analysis using the [SonarScanner for .NET](https://docs.sonarcloud.io/advanced-setup/ci-based-analysis/sonarscanner-for-net/).

&nbsp;  
HTH,  
Ann

---

<div class="post-metadata">

**Author:** ![jeromeLac](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@jeromeLac](https://community.sonarsource.com/u/jeromeLac)\
**Post date:** [September 2, 2022, 8:11am UTC](https://community.sonarsource.com/t/csharp-in-sonarcloud-is-not-recognized-nor-analysed/70802/3 "2022-09-02T08:11:43Z")

</div>

Hello, Thank you for your help.  
I have set the proper scanner mode in the prepare task and it works much better :

_- task: SonarCloudPrepare@1_

- inputs:\*
- 

```
 SonarCloud: 'SonarCloud-SCDevOps-DAM'*

```

- 

```
 organization: 'mycompany'*

```

- 

```
 scannerMode: 'MSBuild'*

```

- 

```
 projectKey: 'mycompany_DAM-FR'*

```

- 

```
 projectName: 'DAM-FR'*

```

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/6/f/6fb4a10371bde040f1e129ff560ac4c6a2e99c11.png)

The subject can be closed.  
Sincerely  
jerome

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/system/32/31083_2.png) [@system](https://community.sonarsource.com/u/system)\
**Post date:** [September 9, 2022, 8:11am UTC](https://community.sonarsource.com/t/csharp-in-sonarcloud-is-not-recognized-nor-analysed/70802/4 "2022-09-09T08:11:59Z")

</div>

Closed on September 9, 2022, 8:11am UTC

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