Search code examples
teamcityteamcity-9.0

Failed to find Visual Studio .sln file - Dynamic parameter for build step template


I am fairly new to using TeamCity. We are currently using 9.16.

I am trying to setup a build template to associate across our many projects and I keep getting the error "Failed to find Visual Studio .sln file" for both the NuGet Installer step and Visual Studio (.sln).

Currently it is set to %system.teamcity.build.checkoutDir% and it says there is no *.sln file there, but there is when I look at the build server directly.

Failed to find Visual Studio .sln file at C:\TeamCity\buildAgent\work\58ef95107452dcbc\*.sln

I found the post regarding attaching the VCS root, but I do have that attached and it mirrors the projects that currently do not use a template.

Any help as to what I am missing would be greatly appreciated.


Solution

  • You must put the filename of your visual studio solution file in the "Solution file path" field of the "Visual Studio (.sln)" build runner step.
    If your .sln file is at the root of your checkout directory you would specify the filename. Example: YourSolution.sln

    For the "Nuget Installer" build runner step you must put the same solution filename in the "Path to Solution File" field.

    Note that if your solution file is not in the root folder of your checkout folder you must specify the relative path. Example: path/to/my/SolutionFile.sln