I have the following stack with an XAF Winforms, Entity Framework Project;
Framework 4.72 exe which references
Framework 4.7.2 library1 which references
.Net Standard 2.0 library2 which references
.Net Standard 2.0 library3
A call down the stack to a method in library3 produces an exception.
System.IO.FileNotFoundException
HResult=0x80070002
Message=Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=3.1.9.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The system cannot find the file specified.
I was able to replicate the problem in a Framework 4.7.2 unit test that called Library2 directly and to solve that.
To solve the problem in the unit test I used BindingRedirectGenerator to generate the runtime section of the unit test app.config as per the answer to my question here
However this does not work when I use the generated section for the application app.config
[Update]
I think the issue is that Library3 calls a framework library... investigating.