How can I set a build step that is executed only when built from Visual Studio and not on the build server?
I want a build step for local debugging, but I do not want this step to run when my build runs on TeamCity.
Is there a way to do this?
You can execute your logic conditionally on the presence of an environment variable
Since your question is tagged MSBuild you can do this
<Project DefaultTargets="Build">
<Target Name="Build" Condition="'$(TEAMCITY_VERSION)' == ''">
<Message Text="Building..."/>
</Target>
</Project>