I am trying to get unit tests running in my .NET Core 1.0 solution. When I run an empty test, it works fine. However, as soon as I try to create a new instance of ApplicationDbContext, the test will fail with the following exception:
System.IO.FileLoadException : Could not load file or assembly 'System.Interactive.Async, Version=3.0.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263'. The located assembly manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) Stack Trace: at Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServiceCollectionExtensions.AddQuery(IServiceCollection serviceCollection) at Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServiceCollectionExtensions.AddEntityFramework(IServiceCollection serviceCollection) at Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.<>c__DisplayClass4_0.<GetOrAdd>b__1(Int64 k) at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) at Microsoft.EntityFrameworkCore.DbContext..ctor(DbContextOptions options) (2 more stack trace lines from my code)
I donβt know why System.Interactive.Async is needed at all, but I added it as a dependency on my Tests project. However, the dll is not copied to the bin \ Debug \ netcoreapp1.0 folder during assembly. If I copy it manually, the effect will be the same. Any ideas what else I can do to make it work?
source share