-
Notifications
You must be signed in to change notification settings - Fork 266
Description
Describe the bug
I have an issue with a project I work on,
My project depends on a third party that uses TestableIO ver 22.
My project also depends on another third party that uses TestableIO ver 21.
In the build directory I have ver 22.
When trying to execute code that uses ver 21 I get an exception:
System.TypeLoadException: 'Could not load type 'System.IO.Abstractions.IFileSystem' from assembly 'TestableIO.System.IO.Abstractions, Version=22.0.15.0, Culture=neutral, PublicKeyToken=96bf224d23c43e59'.'
To Reproduce
Steps to reproduce the behavior:
- Create a console app.
- Reference TestableIO ver 22.
- Reference any third party that depends on ver 21 (I use https://www.nuget.org/packages/Azure.Bicep.Core)
- Instantiate a class from the older ver (in my case I've instantiated
BicepCompiler) - Run the project to see the error.
Expected behavior
The change from ver 21 to 22 should be seamless.
Suggested solution
For this to work seamlessly, we can utilize the TypeForwardedToAttribute
This way clients of ver 21 will still be able to find IFileSystem that moved to its new location.