I am looking for a way to run my defined Target
only once per build process and not for every project that gets build.
I have defined the following in Directory.Build.props
<Target Name="MyTarget" AfterTargets="AfterBuild" >
<Message Text="Hello World!!!" Importance="High" />
</Target>
Should only run once no matter how many projects the msbuild
process is building, currently it happens for each project.
It shouldn't matter if I hit (Re-)Build Soltution
or (Re-)Build [ProjectName]
or hit F5
in Visual Studio, as long any build happens I want to exectue MyTarget
only once.