Creating project from scratch via Kotlin DSL settings



I am trying to create a new sub-project in TeamCity, and I already have a settings.kts file in my repo.

However, to import the settings I need to first create a VCS root, and I also have a VCS root in my settings. If the have the same ids, teamcity throws an error that there is a duplicate VCS root. I thought it would treat them as the same object. It's a bit of a chicken-and-egg problem here which I don't know how to address.

1 comment

Hi Roman. As I understood, in your settings.kts file, you would like to refer to the VCS Root that points to the Versioned Settings repo. If my understanding is correct, you can refer to it as root(DslContext.settingsRoot), e.g.:

object MyBuildType : BuildType({
name = "My Build Type"

vcs {

If this isn't what you are asking for, please elaborate on the question.


Please sign in to leave a comment.