Inside the ConfigureServices
method of the Startup
class you have to call the following:
services.AddMvc().AddApplicationPart(assembly).AddControllersAsServices();
Where assembly
is the instance Assembly
representing Contoso.School.UserService.dll
.
You can load it either getting it from any included type or like this:
var assembly = Assembly.Load("Contoso.School.UserService");