AfterPublish target not working

后端 未结 5 1136
抹茶落季
抹茶落季 2020-12-01 10:40

World\'s simplest task (see below) is not being executed after I publish my web application project. Any idea why?


  <         


        
5条回答
  •  南笙
    南笙 (楼主)
    2020-12-01 10:54

    • You must define override the target at the end of your file, after
    • Launch MSBuild with detailed verbosity to see why your target is ignored :

      msbuild project.csproj /t:Target_to_Launch /v:d
      

    AfterPublish is called after Publish target, but Publish is not the target called when you publish a web application. Publish is the target for publishing ClickOnce application.

    You'll have to find the target used when you call Publish in Visual Studio, it could be Package, WebPublish...

提交回复
热议问题