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
| < | May 2012 | |||||
|---|---|---|---|---|---|---|
| S | M | T | W | T | F | S |
| 29 | 30 | 1 | 2 | 3 | 4 | 5 |
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | 31 | 1 | 2 |
Add-ins AJAX ASP.NET MVC Browsers C# Caching CodeDom Compression CORS CSS CV Data Database DependencyResolver Development Dynamic Entity Framework Error Handling Extend File Upload Forms GDI+ HTML HTML Editor HTTP Interfaces JavaScript JQuery MCE MetadataProvider MSBuild Numbers Objects Patterns Progressive Enhancement Projects Publish Regex Resources Security SEO SMTP Source Control Strings Sub-Collections TDD Templates Tools Twitter User Interface WCF Web Development WHS WMC XLinq XML
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