If you are a WP7 marketplace paid developer like me who is not working on a "real" WP7 handset, instead, using HD2. You will find VS2010 cannot debug with your phone after freshing the custom ROM for HD2. The VS2010 compaint that:
The application could not be launched for debugging. Ensure that the target device screen is unlocked and that the application is installed
And then you probably will try to register your phone since you had paid for the 3 developer unlock quota from App Hub. However, the registration program will also throw an error "Error communicating with the developer portal" with error code 0x64. You will know 0x64 is because the phone cannot connect the App Hub registration services after google.
So what now? Give it up? After some thinking, I suspect the problem is due to the ROM embeded with the "prevent relock" patch which causing the phone cannot connect the registration services. The so-called "prevent unlock" patch is actualy a Registry hack to remove the URL of developer portal which will causing the phone to be relock when connecting with Zune. If so, what I need to do is update the URL back.
<!-- *** COMMENTO *** -->
<parm name="DeveloperUnlockState" value="0" datatype="integer" />
<parm name="PortalUrlProd" value="https://developerservices.windowsphone.com/Services/WindowsPhoneRegistration.svc/01/2010" datatype="string" />
<parm name="PortalUrlInt" value="https://developerservices.windowsphone-int.com/Services/WindowsPhoneRegistration.svc/01/2010" datatype="string" />
<parm name="MaxUnsignedApp" value="2147483647" datatype="integer" />
so I made a relock XAP base on above setup, run on my HD2, reboot (must reboot, otherwise won't take effect), register again, done!
The relock XAP could be downlod here (rename to .xap after download), deploy to your phone, tap "HTC-ProvXml-Deploy", click the green icon, your HD2 will be relock again.