Ant
no notes

Web Application Project Publish (part 2)

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

1 hours ago
TheNextWeb
Bing's search API now live on the Windows Azure Marketplace http://t.co/utX8uOuG by @alex

15/05/2012
WindowsAzure
Announcing the MEET Windows Azure Event! Streamed online June 7th. Register at http://t.co/bObzTAuL  #MEETAzure #WindowsAzure

One hour ago
commadelimited
Buy the @amazon Kindle version of mine and @cfjedimaster's @jquerymobile book for $10 today: http://t.co/PWRZ2dkd

just now
SachinAnand_
RT @html5devconf: @web_mobi's #SachinAnand talks best practices in creating apps with #jquerymobile and #apachecordova, and more! http://t.co/K9g1DftF

just now
marco_cab_
RT @WindowsAzure: Case Study: Schahin Group Gains Flexible Software Licensing and Financing Solution with #Windows Azure http://t.co/vXkYIWjU /via @MSFTCE