Sonar Runner on TeamCity

I am using SonarQube version 7.5 and trying to set up Sonar Runner version 2017.1-22 on Team City.
When I setup the build step to use Sonar Runner with parameter “-Dsonar.scm.provider=git”, I get the error ERROR: Not inside a Git work tree

Since TeamCity checks out the code to a folder that does not has .git folder might cause the above error.
What should be done to run the analysis in this scenario?
Also can I get the exact steps to use Sonar Runner as plugin in TeamCity to analyze a C# .Net project?

Thanks,

Hi,

This is really two separate questions and should be split into two separate threads.

 
Ann

Thanks Ann, I have posted them separately but it seems the community does not have an answer to it.
Can someone please provide the steps for SonarQube integration with TeamCity?

Regards,
Pramod