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

You will also need some tools to get this going, namely;
MSBuild Community Tasks 1.3 or above
Java Runtime
YUI Compressor

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

Post a Note

(required)

(required never shown)

On Twitter Follow MrAntix on Twitter

3 minutes ago
Itmurphy
RT @EricLigman: How you claimed your #FREE #Microsoft eBooks? http://t.co/57dCbiwpyn I'm trying to give away 1,000,000 of them. #MSPartner

4 minutes ago
the15folder
Channel 9: TechNet Radio: (Part 3) Hybrid Windows Azure IaaS Scenarios – Migrating SharePoint to Windows Azure http://t.co/hYRxs8wBL5

4 minutes ago
BWWGeeksWorld
PPTV Builds World's Largest TV Cloud Platform Based on Microsoft Windows Azure... http://t.co/R1gKLbNYGM

5 minutes ago
the15folder
Channel 9: Automating the pop-up and pop-down process of a Windows Azure SharePoint Pop-up Lab with Powershell http://t.co/g9iholcmJC

5 minutes ago
the15folder
Channel 9: Building a SharePoint Pop-up Lab in Windows Azure http://t.co/Bdjcy3VEwL