This repository was archived by the owner on Dec 19, 2018. It is now read-only.
This repository was archived by the owner on Dec 19, 2018. It is now read-only.
TestHost.Create() has incompatible overloads #497
Closed
Description
rc1 added a set of "Func<IServiceCollection, IServiceProvider> configureServices" overloads to TestHost.Create() that is not compatible with the existing "Action configureServices" overloads:
public static TestServer Create(Action<IApplicationBuilder> configureApp, Action<IServiceCollection> configureServices)
public static TestServer Create(Action<IApplicationBuilder> configureApp, Func<IServiceCollection, IServiceProvider> configureServices)
After upgrading to rc1 I get this error from the compiler:
Error CS0407 'void Startup.ConfigureServices(IServiceCollection)' has the wrong return type MediaStreams.Test.
I've currently implemented a workaround by changing signature from void to System.IServiceProvider and returning services.BuildServiceProvider() at the end of the method.