I would like to reduce the interdependencies of some libraries in our project. I'm wondering where is the best place to define custom attributes that are used in several libraries of a new framework.
One possibility would be to have some "DataAnnotations" library containing all attributes. However, this would somehow violate the separation of concerns principle. Additionally, many framework libraries would have to reference this library. The other possibility would be to put the attributes into the Serialization and the UndoRedoManager library. However, this means that the framework libraries would have to reference these directly, so the user has no choice but to include them in his program.
Two concrete examples where the shared attributes are needed, are an undo-redo-manager and a serializer. As long as the user of the libraries defines the data structures alone, he could decide if he wants to add the Serializer together with the necessary attributes. However, in some cases, basic data structures are defined in the framework, which also need the attributes.