[MPOS Technical Development]- Refactoring/Renaming of a CRT Entity in Extensions

If you decide to refactor or rename a Commerce Runtime (CRT) entity (lets say OldEntityName to NewEntityName) inheriting from CommerceEntity, one issue that I have faced is in Retail Server extension assembly the build fails with errors due to the RetailProxy classes relying on the definition of your old entity name.

Example of the error messages that you would see in this scenario are as follows-

Could not load type OldEntityName from assembly… and the command ‘bin\CommerceProxyGenerator.exe’ ..

Retail Proxy Error

The solution to this issue is a little tricky one. You need to compile the CRT data dlls keeping the OldEntityName in the References folder.

You need to then comment any reference to NewEntityName in the Retail Server Extension assembly. Then do a clean and a build of the solution.

If this succeeds with no errors, you can now go ahead to uncomment all references to NewEntityName in the Retail Server Extension assembly.

<Update>This article is based on 7.1 Retail SDK </Update>

-Hitesh Manglani