Using Fake 5.0 on TeamCity. Prior to 5.0 if there was a compilation error the error would be visible in the build failure summary. However now moving to 5.0 if there is an error the details in the summary are the generic output from Fake.
In order to diagnose you have to then dig through the logs to find the compilation error.
This may not be specific to TeamCity because the same outputs are reported from the console.
Wondering if there is a configuration that I am missing either in the way that fake is being run or how the tasks are configured that needs to be set to allow the actual error to propagate up.
Running build script from TeamCity using bash:
%env.BashPath% build.sh run build.fsx
Bash script as per the getting started examples:
#!/usr/bin/env bash
set -eu
set -o pipefail
# liberated from https://stackoverflow.com/a/18443300/433393
realpath() {
OURPWD=$PWD
cd "$(dirname "$1")"
LINK=$(readlink "$(basename "$1")")
while [ "$LINK" ]; do
cd "$(dirname "$LINK")"
LINK=$(readlink "$(basename "$1")")
done
REALPATH="$PWD/$(basename "$1")"
cd "$OURPWD"
echo "$REALPATH"
}
TOOL_PATH=$(realpath .fake)
FAKE="$TOOL_PATH"/fake
if ! [ -e "$FAKE" ]
then
dotnet tool install fake-cli --tool-path $TOOL_PATH --version 5.*
fi
"$FAKE" "$@"
Running the MSBuild task:
Target.create "Build" (fun _ ->
solutionFile
|> MSBuild.build (fun p ->
{ p with
ToolsVersion = Some "15.0"
Verbosity = Some(Quiet)
Targets = ["Build"]
Properties = ["Optimize", "True"
"DebugSymbols", "True"
"Configuration", "Release"
"RunCodeAnalysis", "True"
"CodeAnalysisGenerateSuccessFile", "False"]
}))