delegateas/XrmMockup

Compile errors on duplicate SecurityRole names

mkholt opened this issue · 1 comments

mkholt commented

Describe the bug
It is possible to have multiple security roles with the same name in an environment (MS has recently rolled this out as part of a Marketing update)

When that happens, TypeDef tries to define the same property twice, and one of the roles will overwrite the other.
We should make sure the name is unique when defining security roles.

To Reproduce
Steps to reproduce the behavior:

  1. Have duplicate security role names
  2. Generate context
  3. See error

Expected behavior
The security role names should be unique.

sjkp commented

Since you probably are not using those dublicate security roles for anything, you can just exclude the TypeDeclarations.cs file from the project (so you want get updates when it is generated a new in your pipeline). Then you can make your own ModifiedTypeDeclarations.cs and include that and then clean out the dublicates.