Closed
Description
Description
During the startup, monotouch-test
app collects the assemblies which represent test suites and calls NUnitTestAssemblyRunner
to bundle each of them in a TestSuite object.
This happens in TouchRunner::GetViewController
through LoadSync
method.
The following code path is followed:
Finally, the final piece ends up calling CodeBase
property on Assembly
type which is not supported with NativeAOT:
https://github.com/dotnet/runtime/blob/588dcd7a29f109daae2d8c999322acd8e853a8c6/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/ThunkedApis.cs#L70-L78
Proposal
- Introduce a custom
TestAssemblyBuilder
implementingITestAssemblyBuilder
which would instead fetchAssembly.GetName().FullName
for an assembly - Try reusing
NUnitLiteTestAssemblyBuilder
fromNUnitLite-1.0.0
: https://github.com/spouliot/Touch.Unit/blob/564433f35c8ab6b7bb0709f83e1b81a89c406956/NUnitLite/TouchRunner/TouchRunner.cs#L610-L622
/cc: @rolfbjarne