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"
Comments (1)
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
- Terms of Service agreement checkbox is invisible under specific OS system themes (UI Accessibility)
- Tile Palette: "Create New Tilemap" dropdown area is displayed in several colors
- Input.mousePosition stops syncing to touch input when using "DownloadHandlerTexture" in WebGL build
- UI Builder canvas doesn't update element styling accordingly when changing Active Theme for some Editor Authoring elements
- Selector Value buttons are not aligned with parameters in UI Builder
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.