-
Notifications
You must be signed in to change notification settings - Fork 105
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
Any type loaded from assembly at runtime does not match compile-time type #1069
Comments
@bhaeussermann Thanks! Appreciate the repro! |
@bhaeussermann Can you verify if the fix attached to #1066 (and same in #1065) works for your repro? |
@OsirisTerje It does! Thanks! 🎉 |
Hotfix version 4.4.2, nearly identical to the alpha version attached yesterday, is now released. The difference from the attached version is that the Microsoft.Extensions.DependencyModel is not included in the adapter package. It is not needed there, so it was removed. The release notes is here https://docs.nunit.org/articles/vs-test-adapter/AdapterV4-Release-Notes.html (includes some more explanations) and the package is uploaded to nuget https://www.nuget.org/packages/NUnit3TestAdapter/4.4.2. Thanks, everyone for reporting and providing repros! |
This will affect any test that loads at runtime an assembly containing classes that implement specific interface types (as in plugin system / dependency injection). The interface type implemented by the class will not pass equality against a compile-time reference to that type.
Steps to reproduce
IService
:Service
:NUnit3TestAdapter
package to 4.4.0The test fails. On any version of
NUnit3TestAdapter
before 4.4.0 it passes.The test solution is attached.
LoadAssemblyTest.zip
The text was updated successfully, but these errors were encountered: