We have ASP.NET projects, and built CI integration. Only when building on TeamCity, I need to include several cahnges to published files.
Currently, this is done by manual definition Import directives in csproj files with paths, which are present only on TeamCity server.
Something like this:
<Import Project="$(TeamCityScriptsPath)\episerver_transforms.proj" Condition="Exists('$(TeamCityScriptsPath)\episerver_transforms.proj')" /> (this one defines transforms for additional Episerver configs)
<Import Project="$(TeamCityScriptsPath)\episerver_ci.targets" Condition="Exists('$(TeamCityScriptsPath)\episerver_ci.targets') And Exists('$(TeamCityCiToolsPath)'
Is it possible to make Teamcity to define this import directives on runtime?
As far as I see, Teamcity do some internal changes to .sln and .csproj files in step TeamCity_Generated_Build, which is true for SLN builder and direct MsBuild invocation.