I'm getting the below error at runtime when building for Linux Dedicated Server with either IL2CPP or Mono. I found the Type with the given hash (struct InstanceData : IComponentData) and tried adding [UnityEngine.Scripting.Preserve] and forcefully using it in a MonoBehaviour but the error still happens.
Error when processing 'AsyncLoadSceneJob(/mnt/c/Users/jgraj/Desktop/DarkServerECS/Build/mono/dark_Data/StreamingAssets/EntityScenes/11751be4a2b6987498913ee414ddb1cc.0.entities)': Cannot find TypeIndex for type hash 2509569270566468138. Check in the debug file ExportedTypes.log of your project Logs folder (<projectName>/Logs) the corresponding Component type name for the type hash 2509569270566468138. And ensure your runtime depends on all assemblies defining the Component types your data uses.