Tuesday, June 30, 2009

Converting MSI Project from VS2005 to VS2008 - Welcome Back to (DLL) Hell

Just a few lines to outline something I've recently found out about converting msi projects from vs2005 to vs2008.

After upgrading to VS2008, we've been trying at work to convert everything to 2008. Everything built straightaway, "happy days", we thought.
Comes the first release of THE legacy product we start realizing something is not quite right - the msi is not overwriting all the dlls packaged as expected (this was the behavior on a vs2005 build, where everything was being replaced independently of the version). Also when spawning an msi installation as another process the installation fails and rolls back (which is a always a good crack).

After a bit of digging, looks like good old MS managed to sneak in and ship with vs2008 a fix to the RemoveExistingProducts sequence for msi projects whit the result that msis do not replace files on a vs2008 build unless the version number of the files is greater or has a wildcard in it (i.e x.x.x.*).

Possible solutions? there's plenty, here we go:
  1. Increase the msi project version every release to force an overwrite
  2. Increase single dlls versions (as a decent shop should do) where necessary
  3. Throw wildcards in all your dlls and go home happy

Great - but this doesn't seem to play quite right with COM interoperability where increasing version numbers or the wildcard trick doesn't seem to serve the purpose.

It's back to DLL Hell all over again, and it's time to get creative.

Good luck (any suggestion appreciated).

Tuesday, June 9, 2009

Google App-Engine Mail Service: Unauthorized Sender Error

I was messing around with the Google App-Engine mail service and I stumbled upon a little gotcha that I feel like sharing.

To cut a long story short - you can send emails though the mail service only from emails of accounts (google accounts or other Google app domains) registered as Developers from the Google app engine dashboard (Google App-Engine--> Dashboard--> Developers).

It took me a while to figure this out because:
  1. It doesn't make any sense: assume you wanna setup an admin account to send out mini-reports from your scheduled cron jobs, in this scenario you're supposed to setup your admin@yourDomain.com as a Developer!?
  2. I am linking this Google app deployed to appspot to a domain I have registered with Google, so I thought the app could send emails only from accounts registered as administrator of my given domain, which would make slightly more sense!

But then - I can only blame myself 'cause the documentation clearly says:
The sender must be either the address of a registered developer for the application, or the address of the user for the current request signed in with a Google Account.

As a matter of fact, I never read the documentation till I am desperate (who does?).