I am trying to invoke simple task after publish event. When I say \"publish\", I mean publish in Visual Studio, right click on project and pressing \"Publish...\". I have in
I tried every other answer but they just didn't work. In my case, I'm publishing a VSTO Add-In with VS2015, so maybe there's something different going on, but here are two options that did work:
Part of the reason I (and assumedly others) had a hard time with this is that the Message task doesn't seem to do anything. I was expecting text in the Output view, but nothing was showing up. There were no Message items in the Error List either, but by using Warning instead, they did show up in the Error List. Unfortunately I don't know enough about MSBuild to say why Message isn't behaving as expected.
Edit: See this excellent answer about how to see exactly which targets are being executed.