Entity Framework, Update-Database command gives “Object reference not set” error

If Entity Framework (version below 5.1) on your attempt to Update-Database gives you error of “Object reference not set”, change the default start-up project to MVC project, not anything else. And try the same thing again.
This reported to be fixed in the latest 5.x version of EF, but it is a little annoyance just now.

p.s. This can be eased with parameter: -StartupProject “helloMVC” when running Update-Database command

How to determine what type of WinXP installation disk you have

Open the I386 folder on your XP CD and find a file called SETUPP.INI. That file will contain a line starting PID=
The numbers following the ‘=’ indicate which version of XP is on the disc.

Here’s a list of all the various types of disc along with the volume name, date and PID numbers:
Windows XP Home Retail = WXHFPP_EN 08/23/01 8:00 AM (08:00:00) 55277000
Windows XP Home Retail w/ SP1 = XRMHFPP_EN 08/29/02 8:00 AM (08:00:00) 55277000
Windows XP Home Retail w/ SP1a = X1AHFPP_EN 03/31/03 8:00 AM (08:00:00) 55277000
Windows XP Home Retail w/ SP2 = VRMHFPP_EN 08/04/04 8:00 AM (08:00:00) 55277000
Windows XP Home Upgrade = WXHCCP_EN 08/23/01 8:00 AM (08:00:00) 55285000
Windows XP Home Upgrade W/SP1 = XRMHCCP_EN 08/29/02 8:00 AM (08:00:00) 55285000
Windows XP Home Upgrade W/SP1a = X1AHCCP_EN 03/31/03 8:00 AM (08:00:00) 55285000
Windows XP Home Upgrade W/SP2 = VRMHCCP_EN 08/04/04 8:00 AM (08:00:00) 55285000
Windows XP Home OEM = WXHOEM_EN 08/23/01 8:00 AM (08:00:00) 55277OEM
Windows XP Home OEM w/ SP1 = XRMHOEM_EN 08/29/02 8:00 AM (08:00:00) 55277OEM
Windows XP Home OEM w/ SP1a = X1AHOEM_EN 03/31/03 8:00 AM (08:00:00) 55277OEM
Windows XP Home OEM w/ SP2 = VRMHOEM_EN 08/04/04 8:00 AM (08:00:00) 55277OEM
Windows XP Home Volume = WXHVOL_EN 08/23/01 8:00 AM (08:00:00) 55274270
Windows XP Home Volume W/ SP1 = XRMHVOL_EN 08/29/02 8:00 AM (08:00:00) 55274270
Windows XP Home Volume W/ SP1a = X1AHVOL_EN 03/31/03 8:00 AM (08:00:00) 55274270
Windows XP Home Volume W/ SP2 = VRMHVOL_EN 08/04/04 8:00 AM (08:00:00) 55274270

Windows XP Pro Retail = WXPFPP_EN 08/23/01 8:00 AM (08:00:00) 55274000
Windows XP Pro Retail w/ SP1 = XRMPFPP_EN 08/29/02 8:00 AM (08:00:00) 55274000
Windows XP Pro Retail w/ SP1a = X1APFPP_EN 03/31/03 8:00 AM (08:00:00) 55274000
Windows XP Pro Retail w/ SP2 = VRMPFPP_EN 08/04/04 8:00 AM (08:00:00) 55274000
Windows XP Pro Upgrade = WXPCCP_EN 08/23/01 8:00 AM (08:00:00) 55276000
Windows XP Pro Upgrade w/ SP1 = XRMPCCP_EN 08/29/02 8:00 AM (08:00:00) 55276000
Windows XP Pro Upgrade w/ SP1a = X1APCCP_EN 03/31/03 8:00 AM (08:00:00) 55276000
Windows XP Pro Upgrade w/ SP2 = VRMPCCP_EN 08/04/04 8:00 AM (08:00:00) 55276000
Windows XP Pro OEM = WXPOEM_EN 08/23/01 8:00 AM (08:00:00) 55274OEM
Windows XP Pro OEM w/ SP1 = XRMPOEM_EN 08/29/02 8:00 AM (08:00:00) 55274OEM
Windows XP Pro OEM w/ SP1a = X1APOEM_EN 03/31/03 8:00 AM (08:00:00) 55274OEM
Windows XP Pro OEM w/ SP2 = VRMPOEM_EN 08/04/04 8:00 AM (08:00:00) 55274OEM
Windows XP Pro Volume = WXPVOL_EN 08/23/01 8:00 AM (08:00:00) 55274270
Windows XP Pro Volume w/ SP1 = XRMPVOL_EN 08/29/02 8:00 AM (08:00:00) 55274270
Windows XP Pro Volume w/ SP1a = X1APVOL_EN 03/31/03 8:00 AM (08:00:00) 55274270
Windows XP Pro Volume w/ SP2 = VRMPVOL_EN 08/04/04 8:00 AM (08:00:00) 55274270
Windows XP Pro Tablet PC w/SP1 Disc1 = XRMPFPP_EN 08/29/02 8:00 AM (08:00:00) 55274000
Windows XP Pro Tablet PC w/SP1a Disc1 = X1APFPP_EN 03/31/03 8:00 AM (08:00:00) 55274000
Windows XP Pro Tablet PC w/SP2 Disc1 = VRMPFPP_EN 08/04/04 8:00 AM (08:00:00) 55274000
Windows XP Pro MSDN = WXPFPP_EN 08/23/01 8:00 AM (08:00:00) 55274000
Windows XP Pro MSDN w/ SP1 = XRMPFPP_EN 08/29/02 8:00 AM (08:00:00) 55274000
Windows XP Pro MSDN w/ SP1a = X1APFPP_EN 03/31/03 8:00 AM (08:00:00) 55274000
Windows XP Pro MSDN w/ SP2 = VRMPFPP_EN 08/04/04 8:00 AM (08:00:00) 55274000
Windows XP Pro Evaluation = WXPEVL_EN

How to change a product key on Windows XP

Microsoft kb328874

Note We recommend that you run System Restore to create a new restore point before you follow these steps.

Deactivate Windows

  1. Click Start, and then click Run.
  2. In the Open box, type regedit, and then click OK.
  3. In the navigation pane, locate and then click the following registry key:
    HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\Current Version\WPAEvents
  4. In the topic pane, right-click OOBETimer, and then click Modify.
  5. Change at least one digit of this value to deactivate Windows.
Reactivate Windows and add new product key

  1. Click Start, and then click Run.
  2. In the Open box, type the following command, and then click OK.
    %systemroot%\system32\oobe\msoobe.exe /a
  3. Click Yes, I want to telephone a customer service representative to activate Windows, and then click Next.
  4. Click Change Product key.
  5. Type the new product key in the New key boxes, and then click Update.

    If you are returned to the previous window, click Remind me later, and then restart the computer.

  6. Repeat steps 1 and 2 to verify that Windows is activated. You receive the following message:
    Windows is already activated. Click OK to exit.
  7. Click OK.