Apologies for the recent outage of Dollars2Pounds and the other exchange rate sites. You may not have noticed if you or your ISP had the DNS values in cache as the site was actually up and running.
Just a couple of days ago I updated Dollars2Pounds to use the DNS servers of the host I have the server with, thinking that it would reduce the load on my servers and that they would be less likely to go down than my servers.
How very wrong I was, earlier this evening I got an email from the site monitoring service I use (site up time) telling me that Dollars2Pounds was unreachable.
A quick check and the site was up and running but the DNS servers were not returning anything and the host providers main web site was down as well.
Hopefully this is a rare occurrence, however since EV1Servers got taken over things have gone badly, not least the 3 day outage recently when a transformer blew up.
Lets hope things improve as it's really painful to change hosts and you don't really know what will happen at a new hosts.
I've also managed to accidentally knock the odd site off line over the past week whilst I've been setting up the accounts on the new server.
The good news is that all my exchange rates sites (Dollars2Pounds, Pounds2Euro etc.) are now on a more powerful server and using a more up to date exchange rate source which is updated every 15 or 60 mins. dependent on the currency pair.
Repeating a task for each item in a MSBuild item list is really easy if the task supports ; seperated lists, if not, well it's still easy but trying to remember the syntax is another matter!
This keeps catching me out and I've seen few examples of its use around so if for no other reason than as a reminder to myself here's how to iterate a list of items with MSBuild.
Define your item list as something like:
<InstallerFiles Include="$(MSBuildProjectDirectory)\Setup\**\Release\*.msi" />
In this example I have a folder .\Setup\ which contains multiple subfolders of different setup projects which generate msi files.
<Message Text="Copying installers to Build Output folder. Source = @(InstallerFiles)"/>
<Copy SourceFiles="@(InstallerFiles)" DestinationFolder="$(BuildOutputFolder)" />
This example copies all of the msi files into the BuildOutputFolder.
This method relies on the Copy target to accept a ; separated list of values. Sadly if you have a task that only takes a single value then your a little stuffed with the @ operator.
<Message Text="Copying installers to Build Output folder. Source = %(InstallerFiles.FullPath)"/>
<Copy SourceFiles="%(InstallerFiles.FullPath)" DestinationFolder="$(BuildOutputFolder)" />
This method will call the Copy task once for each item in the InstallerFiles list. But that's not really a fair example as you can just use the @ operator for Copy.
Here's another example that's more appropriate.
<SetupProjects Include="$(DeploymentLocalPath)**\*.vdproj" />
<!-- Some bits to set MSIVersion normally go here and have been removed for clarity →
<Exec Command='$(VersionUpdater) -msi "%(SetupProjects.FullPath)" version=$(MSIVersion)'/>
Here I use the VS.NET Deployment Project Version Updater (http://www.codeproject.com/KB/install/VersionVDProj.aspx) to update each of the setup projects with the MSIVersion number, but this could be any colsole application that took a filename.
The .FullPath is a Wellknown Item Metadata property. Theirs more listed on the MSDN page
Sara Ford also has an example of a good use of metadata for recursive copying (http://blogs.msdn.com/saraford/archive/2005/11/08/490445.aspx).
Theirs also an interesting MSBuild wiki over on Channel 9.