Reputation: 265
According to this link Visual Studio Integration (MSBuild) "Clicking Publish will execute a target named PublishOnly in the project.". Now what I am trying to do is define my own target and execute it when clicking on the "Publish" menu option, however this doesn't seem to work. When I do that I got the Publish Wizard. I was able to customize the Build/Clean/Rebuild targets but no luck with the PublishOnly. Just to add one more thing, I didn't import any of the MS provided targets (Microsoft.CSharp.targets) How do I disable the Publish Wizard and execute my own custom target?
On the same note, what I would like to do is creating a language independent project type which will allow me to add various types of files and customize the basic targets of the project (Build, Clean, PublishOnly) and execute them from within the VS IDE. I know this is another question although somehow related, so could anyone give some directions, share some similar experience or let me know if this is even possible?
Thanks in advance
Julian
Upvotes: 1
Views: 289
Reputation: 4083
Take your custom target and add AfterTargets="Build". This way your publish target will always execute after your build and you won't have to access a wizard.
More on this: http://www.writebetterbits.com/2008/02/deploying-aspnet-web-application.html
Upvotes: 1