I have a Visual Studio 2015 solution that builds 10 projects. In each project there are a pre and post build event to call ant to resolve and publish the code. These events should be triggered before and after every project build, so moving the events to the solution isn't going to work.
Each of the projects should also be capable of building from the command line using ant. When it builds from the command line the events are triggered, but it would be preferable if they weren't.
Does anyone know if there is there a way of VS/MSBuild determining if it is being triggered from within the GUI or from the command line?