Unable to get a binding redirect to work for v1.7.4109.1
See original GitHub issueI have reviewed everything I can find regarding AutoFakeItEasyCustomization and issues trying to load v1.7.4109.1 of FakeItEasy - I just cannot get my tests to run.
My simple test case is:
Fixture = new AutoFixture.Fixture();
Fixture.Customize(new AutoFakeItEasyCustomization());
var value = Fixture.Create<int>();
Without the call to Customize() everything works. With it in place I get the well-known:
Could not load file or assembly ‘FakeItEasy, Version=1.7.4109.1, Culture=neutral, PublicKeyToken=eff28e2146d5fd2c’ or one of its dependencies.
I have the following binding redirect in my app.config file:
<dependentAssembly>
<assemblyIdentity name="FakeItEasy" publicKeyToken="eff28e2146d5fd2c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
I’m using v4.6 of FakeItEasy so I tried changing 4.0.0.0 to 4.6.0.0 but it made no difference.
I’m clearly doing something wrong but I’ve got no idea what else I need to check. Any advice is appreciated.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
ok, I’ll create another project - actually it is two projects (one referencing the other) - may be this is a problem. Stay tuned. Thanks.
The first point should not be a deal-breaker - it’s a common usage pattern. The second one also looks quite strange, but I didn’t have much experience with this setting. In any case it’s very unlikely we can do something from our side to prevent the issue.
Closing this as the problem looks solved. Please reopen the issue if you see changes needed to apply in the library.
Thanks again for spending your time and keeping me updated 😉