Runner configuration for .Net project

I have a asp.net mvc project in gitlab repository.

I want to implement GitLab CI for continuous Integration.

Do we have a gitlab hosted runner to build the .net solution.

When I write the yaml file for msbuild, it is not working.

It don’t have any project specific runners. It is always pulling docker ruby image.

Is there a way to get gitlab hosted runner to build my .net application?

Hi,

Can you please share the config file, and the output from the CI pipeline (screenshot)?

Cheers,
Michael

I have same question can i ms-build .NET project with Shared Runner on GitLab?

Hi,

to my knowledge the shared runners don’t support Windows yet, there were some problems before starting the beta. You can follow its progress in this issue:

Cheers,
Michael

Hi,
so now that the Windows Runners are out in beta, I still have the same problem.
According to the list of installed software, I assume that msbuild should be present, but I don’t really know where to look for it.
When I simply try to use the command, as in putting this in the .gitlab-ci.yml file:

      script:
        - msbuild

it is not recognized

 msbuild : The term 'msbuild' is not recognized as the name of a cmdlet, function, script file, or operable program. 
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ msbuild
+ ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (msbuild:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

so it seems that it isn’t included in the PATH variable. Seems alright, as this is also the case on my local system.

Still, on my local system, I can locate msbuild.exe by doing Get-Childitem –Path *\msbuild.exe -Recurse in PowerShell. On the Runner, this returns nothing, suggesting that there is no msbuild.exe at all?.

I’m out of ideas, am I getting something wrong here, or is there an actual issue with the pre-installed software?
Thanks in advance for any help!