# Pull Request Analysis for .NET code

**URL:** <https://community.sonarsource.com/t/pull-request-analysis-for-net-code/135385>\
**Category:** SonarQube Server / Community Build\
**Tags:** azuredevops, sonar-scanner, pull-request\
**Created:** [February 17, 2025, 6:43pm UTC](https://community.sonarsource.com/t/pull-request-analysis-for-net-code/135385 "2025-02-17T18:43:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![giturr14](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/giturr14/32/65850_2.png) [@giturr14](https://community.sonarsource.com/u/giturr14)\
**Post date:** [February 17, 2025, 6:43pm UTC](https://community.sonarsource.com/t/pull-request-analysis-for-net-code/135385/1 "2025-02-17T18:43:55Z")

</div>

Running Latest LTE of SonarQube Developer  
Deployed via zip on a windows machine

Hello All,

I am trying to incorperate Pull Request Analysis (In Azure DevOps) so that before a merge happens, it must pass the quality gate conditions. Im a bit confused for how this works with .NET code since the Sonar Analysis happens during the BUILD process in the pipeline.

What ive done so far:

- Created the DevOps Platform Integrations. (Used a PAT with read and write permissions)

- Created the Build Validation for the specific pipeline i want

- Created the Status Check and used “SonarQube/quality gate” as the “Status to Check”

- We are using the final yaml code for the sonarqube prep, analysis and publish:

When i try and pull request to test this…it gets stuck on the Status Check (Waiting…)

Am i missing anything? Maybe some configs on the quality gate in SQ server?

Also…im a bit confused with how the PR analysis works with .NET code since the SQ analysis takes place during the build process…So how does SQ analyze the new code that is wanting to be merged into the target branch?

Any help is appreciated.

Thanks!

---

<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:** [February 18, 2025, 6:00pm UTC](https://community.sonarsource.com/t/pull-request-analysis-for-net-code/135385/2 "2025-02-18T18:00:58Z")

</div>

Hi,

I’m not seeing a ‘build’ task in there. Am I misunderstanding something? You need to `begin`, then `build`, then `end`, and _then_ `publish`.

> [@giturr14](#):
>
> So how does SQ analyze the new code that is wanting to be merged into the target branch?

PR analysis is performed against the feature branch before merge. And yes, you’ll have to run a full build on it first.

Does that help?

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![giturr14](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/giturr14/32/65850_2.png) [@giturr14](https://community.sonarsource.com/u/giturr14)\
**Post date:** [February 18, 2025, 7:52pm UTC](https://community.sonarsource.com/t/pull-request-analysis-for-net-code/135385/3 "2025-02-18T19:52:09Z")

</div>

got it figured it out! thank you!
