Describe the bug
When a DLL of an assembly definition is added to assemblies included in Reflection Baking, the DLL gets broken and is not executed.
To Reproduce
Steps to reproduce the behavior:
Import Zenject into an empty project.
Go to Assets/Plugins/Zenject/OptionalExtras/SampleGame1 (Beginner)/Scripts
Create an assembly definition called Beginner and add Zenject to assembly definition references.
Create the ZenjectReflectionBakingSettings scriptable object.
Untick "All Generated Assemblies", tick "Is Enabled In Editor".
Add Zenject.dll and Beginner.dll to included assemblies.
Open the Asteroids scene.
Enter Play Mode.
Get the following errors:
Error when modifying type 'Asteroid'
FileNotFoundException: Could not load file or assembly 'Zenject-usage, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
Unloading broken assembly Library/ScriptAssemblies/Beginner.dll, this assembly can cause crashes in the runtime
It seems to me that this feature should be removed, because reflection is baked through il2cpp. I fixed this problem in my project and the a bench showed that the project even slowed down a little.
Describe the bug When a DLL of an assembly definition is added to assemblies included in Reflection Baking, the DLL gets broken and is not executed.
To Reproduce Steps to reproduce the behavior:
Detailed stack traces:
Expected behavior Reflection is baked for Beginner.dll, the are no broken DLLs.
Screenshots
Extenject and Unity info (please complete the following information):
Project's scripting backend: Tried both Mono and IL2CPP, NET Standard 2.0 and NET4.x
The reflection baking works fine for Zenject itself, and for Assembly-CSharp.dll, but not for in-project assembly definitions.