So from investigations in part 1 it seems that the WebApplication Publish option in Visual Studio could not be extended. So what other options are there to get VS to publish a web application with a specific web.config and compressed js and css files?
Extending the project file with an custom target to preform these actions seems to be the way forward. The key is to make this a deliberate action which is separate to build during development. This can be done using the Configuration Manger and adding a new configuration which when selected will trigger the extra steps and publish the app.
So thats what I have done, head on over to google code and have a look see
What it does;
Updates AssemblyInfo.cs version numbers
Publishes the application to a versioned folder
Checks for Web_Publish.config
Compresses js and .css files found in the application
FTPs the application to your server
Full instructions can be found in the Antix.WebApplication.Publish.targets file
This is most appropriate for those who currently use the 'Publish' option in VS but want the additional tasks. It could also be extended to have configurations for publish to different environments say 'PublishToTest' and 'PublishToLive'.
Anyway thats it, if you have any comments please use my contact page
ps. works on web services too