Analyzing project with GitLab CI fails

Hi All,
I’m using a SonarQube Version 9.8 (build 63668) on the same server as gitlab on my debian 10. I have set up authorization via gitlab and everything works fine, but when I add my project from gitlab and try to analyze it with GitLab CI I get an error.
On a first step (What option best describes your build?) I choose .NET or Other.
Then creating a sonar-project.properties and .gitlab-ci.yml file.
Add environment variables.
And then nothing happens. I found in the documentation that a runner is needed. I made it and launched it (it lights up green). But I still get errors.
In the case of .NET:

Running with gitlab-runner 16.6.1 (f5da3c5a)
  on Second NY7YNH4y, system ID: s_07300a20163f
Preparing the "shell" executor
00:00
Using Shell (bash) executor...
Preparing environment
00:00
Running on astra...
Getting source from Git repository
00:01
Fetching changes...
Reinitialized the existing Git repository in /home/gitlab-runner/builds/NY7YNH4y/0/I.Guzhviy/test2/.git/
Checking out 65deb853 as detached HEAD (ref is main)...
Skipping Git submodules setup
Restoring cache
00:00
Checking cache for sonarqube-check-protected...
Runtime platform                                    arch=amd64 os=linux pid=25419 revision=f5da3c5a version=16.6.1
No URL provided, cache will not be downloaded from shared cache server. Instead a local version of cache will be extracted. 
Successfully extracted cache
Executing "step_script" stage of the job script
00:02
$ export PATH="$PATH:$HOME/.dotnet/tools"
$ dotnet sonarscanner begin /k:"I.Guzhviy_test2_AYxjS6lfKiEQ78czx2y8" /d:sonar.login="$SONAR_TOKEN" /d:"sonar.host.url=$SONAR_HOST_URL"
SonarScanner for MSBuild 6.0
Using the .NET Core version of the Scanner for MSBuild
Pre-processing started.
Preparing working directories...
16:40:54.82  Updating build integration targets...
16:40:54.928  Fetching analysis configuration settings...
16:40:55.66  Provisioning analyzer assemblies for cs...
16:40:55.661  Installing required Roslyn analyzers...
16:40:55.662  Processing plugin: csharp version 8.50.0.58025
16:40:55.713  Processing plugin: vbnet version 8.50.0.58025
16:40:55.994  Provisioning analyzer assemblies for vbnet...
16:40:55.994  Installing required Roslyn analyzers...
16:40:55.994  Processing plugin: csharp version 8.50.0.58025
16:40:55.997  Processing plugin: vbnet version 8.50.0.58025
16:40:56.027  Incremental PR analysis is available starting with SonarQube 9.9 or later.
16:40:56.027  Cache data is empty. A full analysis will be performed.
16:40:56.059  Pre-processing succeeded.
$ dotnet build
Microsoft (R) Build Engine version 17.0.0+c9eb9dd64 for .NET
MSBUILD : error MSB1003: Specify a project or solution file.
ERROR: Job failed: exit status 1

In the case of Other:

Running with gitlab-runner 16.6.1 (f5da3c5a)
  on Second NY7YNH4y, system ID: s_07300a20163f
Preparing the "shell" executor
00:00
Using Shell (bash) executor...
Preparing environment
00:00
Running on astra...
Getting source from Git repository
00:00
Fetching changes...
Reinitialized the existing Git repository in /home/gitlab-runner/builds/NY7YNH4y/0/I.Guzhviy/test2/.git/
Checking out e4855961 as detached HEAD (ref is main)...
Skipping Git submodules setup
Restoring cache
00:01
Checking cache for sonarqube-check-protected...
Runtime platform                                    arch=amd64 os=linux pid=28463 revision=f5da3c5a version=16.6.1
No URL provided, cache will not be downloaded from shared cache server. Instead a local version of cache will be extracted. 
Successfully extracted cache
Executing "step_script" stage of the job script
00:00
$ sonar-scanner
bash: line 143: sonar-scanner: command not found.
ERROR: Job failed: exit status 1

Hey there.

It would seem you aren’t in a directory with a solution file.

Can you try running a ls before dotnet build to see where you are in your repo?