EF Core RC2 AppDomainUnloadedException
<p>Since i've updated EF Core from RC1 to RC2, the tests are passing on my local VS2015, but not in TFS Build (VSTest).</p>

<p>For the tests failing, i'm using the In-memory test provider as follows:</p>

<pre><code>    /// &lt;summary&gt;
    /// Initializes the in-memory database, as recommended by the EF Core  
    /// documentation.
    /// &lt;/summary&gt;
    private DbContextOptions CreateNewContextOptions()
    {
        var serviceProvider = new ServiceCollection()
            .AddEntityFrameworkInMemoryDatabase()
            .BuildServiceProvider();

        var builder = new DbContextOptionsBuilder();
        builder.UseInMemoryDatabase()
               .UseInternalServiceProvider(serviceProvider);

        return builder.Options;
    }

    [Test]
    public void TestMethod()
    {
        //Arrange
        var contextOptions = CreateNewContextOptions();
        var dataMapper = new DAL.DataMappers.BuurtcampagneDataMapper(contextOptions);

        //Act
        dataMapper.Add(_buurtcampagne);
        var count = dataMapper.FindAll();

        //Assert
        Assert.AreEqual(1, count);
    }
</code></pre>

<p>The data access is as follows:</p>

<pre><code>    ctor blabla..    
    private DbContextOptions _options;

    public IEnumerable&lt;Buurtcampagne&gt; FindAll()
    {
        using (var context = new BuurkrachtContext(_options))
        {
            var query = context.Buurtcampagnes
                .ToList();
            return query;
        }
    }


    public void Add(Buurtcampagne buurtcampagne)
    {
        using (var context = new BuurkrachtContext(_options))
        {
            context.Buurtcampagnes.Add(buurtcampagne);
            context.SaveChanges();
        }
    }
</code></pre>

<p>The error stack trace is as follows:</p>

<pre><code>System.AppDomainUnloadedException : Attempted to access an unloaded AppDomain.
at System.Runtime.Remoting.ObjectHandle.Unwrap()
at Microsoft.Extensions.Caching.Memory.CacheEntryHelper.get_Scopes()
at Microsoft.Extensions.Caching.Memory.CacheEntryHelper.EnterScope(CacheEntry entry)
at Microsoft.Extensions.Caching.Memory.CacheEntry..ctor(Object key, Action`1 notifyCacheEntryDisposed, Action`1 notifyCacheOfExpiration)
at Microsoft.Extensions.Caching.Memory.MemoryCache.CreateEntry(Object key)
at Microsoft.Extensions.Caching.Memory.CacheExtensions.Set[TItem](IMemoryCache cache, Object key, TItem value)
at Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQuery[TResult](Object cacheKey, Func`1 compiler)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.CompileQuery[TResult](Expression query)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query)
at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.Execute[TResult](Expression expression)
at Remotion.Linq.QueryableBase`1.GetEnumerator()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at InfoSupport.BSBuurkracht.DAL.DataMappers.BuurtcampagneDataMapper.FindAll() in D:\4\_work\2\s\BSBuurkracht\InfoSupport.BSBuurkracht.DAL\DataMappers\BuurtcampagneDataMapper.cs:line 62
at InfoSupport.BSBuurkracht.DALTests.EFCoreDataMapperTests.BuurtcampagneDataMapperTests.TestMethod() in D:\4\_work\2\s\BSBuurkracht\InfoSupport.BSBuurkracht.DALTests\EFCoreDataMapperTests\BuurtcampagneDataMapperTests.cs:line 49
</code></pre>

<p>Who can help me?</p>