After Publish event in Visual Studio

前端 未结 5 2000
情书的邮戳
情书的邮戳 2020-12-05 13:41

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

5条回答
  •  旧时难觅i
    2020-12-05 14:16

    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.

提交回复
热议问题