问题
We are consistently getting the following RIA error message, after branching a team project in TFS:
The Entity 'abc' in DomainService 'MyDomainService' does not have a key defined. Entity types exposed by DomainService operations must have at least one public property marked with the KeyAttribute.
Everything works in the source branch, and when comparing the two branches there is absolutely no difference.
I have also tried to install TFS 2012 on a virtual machine, import the project there, and branch it out. Again the source project works fine, but the branched version fails.
Anyone who has any idea where to look to solve this?
UPDATE
It's not consistent, as I just succeeded in creating a new branch. However I've found the renaming a project can cause the same behaviour. A (quite cumbersome) fix seems to be to create new workspaces until it succeeds...
来源:https://stackoverflow.com/questions/14833699/no-key-defined-error-on-entity-after-branching-in-tfs