Search Issue Tracker
Active
Votes
8
Found in [Package]
1.0.0
Issue ID
DSTR-45
Regression
Yes
Build for UWP fails when "PlayMode tests for all assemblies" is enabled
How to reproduce:
1.Download "New Unity Project.zip" and open "SampleScene" Scene
2. Build project for UWP
Expected result: Build for UWP succeeds with option "PlayMode tests for all assemblies" enabled
Actual result: Build for UWP fails with the option "PlayMode tests for all assemblies" enabled (see the attached 1208398.png)
Reproduced with: 2020.1.0a19, 2019.3.0f4, 2019.2.18f1
Regression introduced in: 2019.2.0a10
Note:
- When the build fails - there is an error in Console Window "UnityException: Failed to run reference rewriter with the command"
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “ValidateSchema Error2” error is thrown in the Player when using IL2CPP Scripting Backend
- Symbolic links disappear when a .xcframework file is added through the Unity Editor
- Errors regarding importing occur upon opening a project when the "Library" folder is deleted
- MeshRenderer.sortingLayerID cannot be changed when change is being done in a built Player
- Warnings related to App Icon are being thrown when building project to VisionOS Platform
unity_kD973qMc5jKkGQ
Jan 11, 2021 15:51
The problem is that you are trying to include the TestAssembly definitions in the player build, which is a deprecated behavior. If you want to build for UWP you just need to remember to disable playmode tests for all assemblies from the dropdown menu by right clicking on Test Runner tab.
The `playModeTestRunnerEnabled` flag, which is enabled or disabled from clicking the above-mentioned button, was used before the introduction of assembly definition files.
It is no longer necessary, creating an empty Unity project the flag will by default set to 0 (disabled). If you really need to have the playmode tests for all assemblies enabled to run your tests inside the editor just remember to disable it before building the player.
We recommend putting tests into separate assemblies and using assembly definition files. This way you will have more control over which assemblies need to reference test related dlls.