Based on the 7.1 Retail SDK.
Renaming or refactoring a Commerce Runtime (CRT) entity that inherits from CommerceEntity — say, from OldEntityName to NewEntityName — breaks the build of your Retail Server extension assembly. The RetailProxy classes are generated from the old entity definition, and the build fails with errors like:
Could not load type OldEntityName from assembly...
along with a failure in the bin\CommerceProxyGenerator.exe step.

The fix
The trick is doing the rename in two passes instead of one:
- Compile the CRT data DLLs with
OldEntityNamestill present in the References folder. - Comment out every reference to
NewEntityNamein the Retail Server extension assembly, then do a clean build of the solution. - Once that build succeeds with no errors, uncomment all the
NewEntityNamereferences in the Retail Server extension assembly.
This gets the proxy generator working against a known-good state before reintroducing the new name, instead of fighting a build that's trying to resolve both names at once.