You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Going back to pull-request #71 I have managed to recreate a similar issue, I have created a repository here
When running the test I get the error message:
System.IO.FileLoadException : Could not load file or assembly 'System.IO.Abstractions, Version=1.4.0.86, Culture=neutral, PublicKeyToken=d480b5b72fb413da' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at PactNet.Infrastructure.Logging.LocalRollingLogFileMessageHandler..ctor(String logFilePath)
at PactNet.Infrastructure.Logging.LocalLogProvider.AddLogger(String logDir, String loggerNameSeed, String logFileNameTemplate) in C:\projects\pact-net\PactNet\Infrastructure\Logging\LocalLogProvider.cs:line 36
at PactNet.Infrastructure.Logging.LocalLogProvider.AddLogger(String logDir, String loggerNameSeed, String logFileNameTemplate) in C:\projects\pact-net\PactNet\Infrastructure\Logging\LocalLogProvider.cs:line 37
at PactNet.Infrastructure.Logging.LocalLogProvider.AddLogger(String logDir, String loggerNameSeed, String logFileNameTemplate) in C:\projects\pact-net\PactNet\Infrastructure\Logging\LocalLogProvider.cs:line 37
at PactNet.Infrastructure.Logging.LocalLogProvider.AddLogger(String logDir, String loggerNameSeed, String logFileNameTemplate) in C:\projects\pact-net\PactNet\Infrastructure\Logging\LocalLogProvider.cs:line 37
at PactNet.Mocks.MockHttpService.Nancy.NancyHttpHost..ctor(Uri baseUri, String providerName, PactConfig config, Boolean bindOnAllAdapters) in C:\projects\pact-net\PactNet\Mocks\MockHttpService\Nancy\NancyHttpHost.cs:line 27
at PactNet.Mocks.MockHttpService.MockProviderService.<>c__DisplayClass13_0.<.ctor>b__0(Uri baseUri) in C:\projects\pact-net\PactNet\Mocks\MockHttpService\MockProviderService.cs:line 45
at PactNet.Mocks.MockHttpService.MockProviderService.Start() in C:\projects\pact-net\PactNet\Mocks\MockHttpService\MockProviderService.cs:line 129
at PactNet.PactBuilder.MockService(Int32 port, JsonSerializerSettings jsonSerializerSettings, Boolean enableSsl, Boolean bindOnAllAdapters) in C:\projects\pact-net\PactNet\PactBuilder.cs:line 78
at PactNet.PactBuilder.MockService(Int32 port, Boolean enableSsl, Boolean bindOnAllAdapters) in C:\projects\pact-net\PactNet\PactBuilder.cs:line 58
at PactNetTests.ContractTest.SetUp()
The text was updated successfully, but these errors were encountered:
OK, so I have worked out why this is happening for only System.IO.Abstractions.
Basically it is because the assembly binding redirect is not being added to the app.config when installing the latest package.
This should happen automatically however it is not, because from version 2.0.0.124 (of System.IO.Abstractions see TestableIO/System.IO.Abstractions#178) the assembly has not been correctly signed. As such the binding redirect will not be auto created on package install and the result is that runtime exception.
The System.IO.Abstractions team are looking into this now (see TestableIO/System.IO.Abstractions#182), however in the meantime you will just need to add the correct binding redirect manually.
Going back to pull-request #71 I have managed to recreate a similar issue, I have created a repository here
When running the test I get the error message:
The text was updated successfully, but these errors were encountered: