Two recent oops: odd error messages and their solutions

Posted: (EET/GMT+2)

 

I happen to have quite many machines, both virtual and physical, that I use to test various things. Most of these machines have Visual Studio installed, some have Expression products, and some have server applications like SQL Server 2005 and 2008 installed.

And yes, I confess I sometimes forgot which is which, and thus I sometimes run into error messages that appear to be difficult to solve, but in the end are very easy puzzles. So here goes, two recent "oops".

Number 1: Trying to install Expression Blend 2 SP1 on a machine that only has Expression Blend 1 installed. As you can guess, didn't work out so well. But the problem is, the error message you will get is by no means very helpful. It goes like this:

---------------------------
Microsoft Expression Blend 2 Service Pack 1
---------------------------
Microsoft Expression Blend 2 Service Pack 1 may have failed to install. Windows Installer returned error code 1605.
---------------------------
OK
---------------------------

So, if you happen to run into this kind of error message, you know what's going on. The lesson: doing a quick glimpse into the Start menu tells Expression Blend is installed, but if you aren't careful, you might miss the version number.

Number 2: Updating an older Visual Studio 2005 project and testing the new F# compiler at the same time might not be a good idea. My intention was to access an SQL Server database and read data from there with F#.

But this can be doomed if you happen to have lingering assembly references into assemblies that are only good for older .NET versions, or even .NET Compact Framework. So, I got this error message when trying to open an connection to the SQL Server database:

Unhandled Exception: System.EntryPointNotFoundException: Unable to find an entry
point named 'PAL_LocalAlloc' in DLL 'dbnetlib.dll'.
   at System.Data.SqlClient.SqlConnection.Open()
   at .$Test._main() in
   C:\Source\FSharpDBTest\AccessSQL.fs:line 24

Not very helpful! First I thought my virtual machine would have for some reason multiple dbnetlib files, but then I went to check the F# project references. Remember, to access System.Data.SqlClient, you don't need to reference System.Data.SqlClient.dll, as System.Data.dll will do just fine!

By the way, I didn't find much information on the Internet about either of these error messages, so here goes. "Gotcha!"