Fix: When running more than one test in a test run, only the first would load plugins correctly (#6985)

Reported by @napoly.

## Actual behavior

Two tests were created. When we would run the tests through the runner,
ASP.NET wouldn't find the registered view of the plugin.

## Expected behavior

The second test should works find, ASP.NET should properly find the
views of the plugin when there are more than one test in the same test
run.

## Cause

If we detected that a plugin assemly was already in the AppDomain, then
we were not loading the ApplicationParts of such assembly.
This wasn't the case for the first test run, but would be after.

The reason for initially doing this was that long time ago, we would
test plugins by referencing them from BTCPaySevrer project. But since
this is not how we are doing things anymore, I think it is safe to
remove this "Feature".
This feature was broken anyway since we started loading plugins in their
own context, but this wouldn't happen with the old way of referencing
plugins from BTCPayServer. (#6851)
This commit is contained in:
Nicolas Dorier
2025-11-12 00:15:31 +09:00
committed by GitHub
parent 2ca06c6614
commit 894643c5a3

File diff suppressed because one or more lines are too long