World's simplest task (see below) is not being executed after I publish my web application project. Any idea why? Thank you.
<Target Name="AfterPublish">
<Copy SourceFiles="C:\A.txt" DestinationFiles="C:\B.txt" />
</Target>
World's simplest task (see below) is not being executed after I publish my web application project. Any idea why? Thank you.
<Target Name="AfterPublish">
<Copy SourceFiles="C:\A.txt" DestinationFiles="C:\B.txt" />
</Target>
<Import ... />
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
...