Skip to content

Introduction of Microsoft.Extensions.DependencyModel causes reflection crashes #1324

@OsirisTerje

Description

@OsirisTerje

The engine version 3.16.3 is used in the NUnit3TestAdapter 4.4.0.
Vesion 3.16.2 introduced a new way of loading assemblies, including reading of the deps.json file, and this is using the Microsoft.Extensions.DependencyModel version 3.1.0.
When using .net 6 this crashes when the software under test is using reflection. There are several cases of this, reported in issues nunit/nunit3-vs-adapter#1065 and nunit/nunit3-vs-adapter#1066.
It may be that newer versions of this package, or related dependency injection packages, are not compatible with the version 3.1.0.

We need to either remove Microsoft.Extensions.DependencyModel and then rewrite the assembly loading, or ensure it works for all frameworks and for the different cases of reflection loading, as described in the issues referred to.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions