TFS assembly discovery and Visual Studio assembly

Is it possible to determine if the current build is from Visual Studio, and not the automatic build with TFS without creating a separate solution configuration? I am wondering if I can exclude certain Post Build events if the build works on TFS 2013, but if possible, I would like to avoid a whole separate configuration.

+4
source share
2 answers

You do not need to edit the CSProj file: just use the CMD.EXE syntax in Visual Studio Post-Build events

You can check if it works inside Visual Studio

IF "$(BuildingInsideVisualStudio)"=="true" ( … )

or inside TFS Build (2013 or later)

IF "$(TF_BUILD)"=="True" ( … )

. a TFS 2010 Build Automation Team Foundation Build.

+4

, , :

  • , PostBuildEvent.
  • .csproj.
  • XML- PostBuildEvent Condition, :

    <PostBuildEvent Condition="'$(BuildingInsideVisualStudio)' == 'true'">

PostBuildEvent Visual Studio.

.

MSDN.

+3

All Articles