Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Assembly has reference to non-existent assembly 'UnityEngine.TestRunner'" compiler error #8

Closed
rfadeev opened this issue Apr 14, 2020 · 3 comments

Comments

@rfadeev
Copy link

rfadeev commented Apr 14, 2020

Commit id: 84cbe0e
Open BuildReportInspector/TestProject with Unity and observe two compilation errors in console:

Assembly has reference to non-existent assembly 'UnityEngine.TestRunner' (Packages/com.unity.build-report-inspector/Tests/Editor/Mobile/Unity.BuildReportInspector.Editor.Tests.Mobile.asmdef)
Assembly has reference to non-existent assembly 'UnityEngine.TestRunner' (Packages/com.unity.build-report-inspector/Tests/Editor/Unity.BuildReportInspector.Editor.Tests.asmdef)

Does not reproduce on master branch commit 3039f04 adding package to empty Unity project.

Reproduced with Unity 2018.4.6f1.
Not reproduced with Unity 2019.3.0f6.

@Wilfrid-Unity
Copy link
Collaborator

Thanks @rfadeev for reporting this.

@iRunn3r This sounds related to branch mobile only. Do you see how to avoid that?
By the way, branch mobile is still under development, right? Or would you say it is quite stable already?

@rfadeev
Copy link
Author

rfadeev commented Apr 15, 2020

@Wilfrid-Unity No problem! Since pull request #7 with mobile branch is targeting master, it's a potential problem. If it's a known problem, then this issue is false alarm and I'm fine to close it.

This can be fixed by having "Test Assemblies" toggle on in inspector for those problematic asmdef files. Then asmdef json would have:

  • "references" array without"UnityEngine.TestRunner" and "UnityEditor.TestRunner" elements
  • "optionalUnityReferences" array with single "TestAssemblies" element
  • "precompiledReferences" array without "nunit.framework.dll" element

@vaidas-unity
Copy link
Contributor

Thank you for the fix suggestion, @rfadeev, I have applied it at c210103.

vaidas-unity added a commit that referenced this issue Apr 22, 2020
* Add a simple tests project

* Start mobile implementation, some refactoring

* Remove redundant apkanalyzer.bat check

* Fix architecture display handling

* Fix asset entries without filenames showing as blank

* Revert java directory check

* Fix bundletool path on windows

* Fix iOS file list (remove empty entries)

* Implement iOS report generation

* Fix enum naming style

* Refactor MobileHelper appendix generation

* Fix AndroidPlayer tool path handling

* Fix previous

* Fix Android-specific code execution without android support installed

* Fix incomplete asset list being shown (fixes #1)

* Small error

* Fix script path in documentation

* Minor docs fixes

* Remove buildreports dir

* Fix BuildReports dir ignore pattern

* Refactor project structure

* Drafting docs for mobile support

* Fix linux bundletool path resolution

* Refactor platform utilities

* Remove rider plugin

* Ignore plugins

* Correct ifdefs

* Add version-aware sdk and jdk resolution

* Fall back to C# 4.0 features

* Small style refactor

* Add tvOS support

* Fix mobile project structure and namespaces

* Reduce project hierarchy nesting

* Try adding test folder

* Fix test manifest declaration

* Make Mobile files invisible to versions below 2019.3

* Minor docs update

* Bump package version, update changelog

* Add tests for Android mobile appendix

* Reduce mobile requirement to 2019.1

* Fix untiy version for asset display

* Bump test version to 2019.3

* Add mobile test yamato config

* fix mistype

* Fix utr launch commands

* test yaml update

* Fix android test sdk/ndk for ci

* Symlink android tools

* Remove pack dependency from mobile tests

* increase agent memory

* change symlink command

* Fix appendix handling

* Fix platform specific code not being compiled during tests

* Remove ifdefs from postbuildsetup

* Temp workaround for Android NDK on macOS

* Fix package manifest

* Update testable version list

* include mobile with other tests

* Include pack as mobile dependency

* Amend previous

* Fix test dependency tree

* Remove 2018.4 from tested versions

* Fix test assembly references in test asmdefs (fixes #8)

* Bring 2018.4 tests back

* Bump minimum package version to 2018.4

* Make main test job virtual

* Fix errors when attempting to load non-existent appendix

* Fix ifdefs

* Sync documentation files

Co-authored-by: Vaidas Budrys <vaidas.budrys3@gmail.com>
Co-authored-by: Vaidas Budrys <35662767+iRunn3r@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants