TeamCity variables are available because any environment variable is located in MSBuild, as a property that can be accessed using the $ () syntax.
TeamCity , . , teamcity.version TEAMCITY_VERSION MSBuild $(TEAMCITY_VERSION). ( ).
, , , :
<Target Condition=" '$(TEAMCITY_VERSION)' != '' " >
<Message Text="Running on build server!..." />
</Target>
, TeamCity NUnit MSBuild, :
<UsingTask Condition=" '$(teamcity_dotnet_nunitlauncher_msbuild_task)' != '' "
TaskName="NUnit" AssemblyFile="$(teamcity_dotnet_nunitlauncher_msbuild_task)" />