Using EF 4.1 Code First without SQL Express

I began following Julie Lerman’s excellent tutorials on getting started with Entity Framework (EF) version 4.1 and the Code First technique of generated databases on the MSDN web site.  However, the defaults for Code First expect you to have SQL Server Express installed for the examples to work.  I was able to get EF Code First to work with SQL Server (not Express) by adding the following connection string to my web.config file:

<add name="BlogContext"
connectionString="Server=.;Database=BlogContext.mdf;Integrated Security=SSPI;"
providerName="System.Data.SqlClient" />

Just make sure that the name, e.g. BlogContext, matches the name of the class derived from DbContext.  Note that you will also likely need to replace the “.” in “Server=.” with whatever your server name is.  The “.” is just a reference to the SQL Server running on your local machine.


Where TFS Connections Are Stored

I am migrating from one dev machine to another and wanted to export/import my TFS connections for Visual Studio 2010.  It turns out they are all stored in the following registry key:


If you’re looking for the Visual Studio 2008 entries, they are located here:



WCF Test Client

Every time I set up Visual Studio on a new machine, one of the first things I do is add the WCF Test Client tool to the Tools menu.  This tool lets you call methods on your WCF web services to test them.  It can be found here:

"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\WcfTestClient.exe"


Convert AAC to M4A

I needed to wrap an AAC file in an M4A container so I could load it into my Windows Phone 7 (WP7) music collection.  First I downloaded the FFmpeg software from here:

Then I unzipped the files and ran the following command:

C:\FFmpeg\bin>ffmpeg -i "song.aac" -acodec copy -absf aac_adtstoasc "song.m4a"

That solved the problem of not being able to add an “MP3” tag to my audio file.


Successfully changing the MAC address in VMware

I have been fighting with VMware Workstation 7.1.4 for the past day trying to change the MAC address of a Windows guest virtual machine. I tried a number of recommendations from around the web, but the one that finally worked was setting a static MAC address as follows:

  1. Edit your “<vmname>.vmx” file with a text editor like Notepad.
  2. Determine if you have a line similar to the following:
    1. ethernet0.addressType = "generated" (Note: that's a zero after "ethernet", not the letter o)
  3. If so, change it to the following.  If not, just add the following line:
    1. ethernet0.addressType = "static"
  4. Then add the following line, where each two-digit number can be any legitimate hex value, e.g. 00 through FF:
    1. ethernet0.address = "00:0c:29:12:34:56"

This solution was found here, along with another solution that did not work for me.

Load more