5
votes

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.

3

3 Answers

2
votes

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

0
votes

What I was attempting to do is not possible.

Instead I created a parameter at the root level for SolutionFile in the templates. Then I simply change the value of that parameter in each project that uses the template.

0
votes

In my case I was moving from SVN to GIT with TeamCity, and so had to change the VCS root from:

http://build.server.url:81/svn/MyApp/

To,

http://[email protected]:7990/MyApp/MyApp.git

Also, I had to change "checkout rules" from:

+:trunk => .

To,

+: => .

Because the default branch in TeamCity for GIT is refs/heads/master

For details, please see https://confluence.jetbrains.com/display/TCD10/Git