Reputation: 26
As stated in the title, all pre-build events exit with code 1. I was originally using 'git describe --tags > "$(OutputDir)version.txt"', but I have changed the command here to show that even a simple 'echo' command is failing. I have attempted to repair the installation, but no luck. The diagnostic output does not give any clear details. I am running Visual Studio 2019 Version 16.11.5.
Error Message:
Error MSB3073 The command "echo" exited with code 1.
Diagnostic Output:
1>Target "PreBuild" in file "C:\Apps\Development\captain\Cadet\Cadet.csproj":
1> Using "Exec" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
1> Task "Exec"
1> Task Parameter:Command=echo
1> echo
1> C:\Apps\Development\captain\Cadet\Cadet.csproj(27,5): error MSB3073: The command "echo" exited with code 1.
1> Done executing task "Exec" -- FAILED.
1>Done building target "PreBuild" in project "Cadet.csproj" -- FAILED.
Pre-Build Event in .csproj
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="echo" />
</Target>
Upvotes: 0
Views: 741