Today, I came to know about AfterBuild
target when I was trying to build a GitHub project. I had hard time figuring out a failing command which was getting fired after the build. I was not sure from where the command was getting fired because its post build event was empty.
This was the tag which I commented to get rid of the error:
<Target Name="AfterBuild" DependsOnTargets="_GetSignToolPath">
<Exec Command=""$(_SignToolPath)" sign /fd sha256 /sha1 $(SigningCertificateThumbprint) /t http://timestamp.verisign.com/scripts/timstamp.dll /v "$(TargetPath)"" />
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(MSBuildThisFileDirectory)..\Demo Website\Content" />
</Target>
To edit post build events we go to project properties of any C# project and then click on Build Events
tab. Here we get the option to edit the post-build event:
So similarly is there any UI in Visual Studio to edit AfterBuild
targets of a C# project? OR this can be edited only by modifying the project XML after unloading the project. I'm using Visual Studio 2019.