If you want to use ICommonLogServiceICommonLogService in the startupStartup.cs class, you need to get an instance from the container like this:
public IServiceProvider ConfigureServices(IServiceCollection services) { var container = new Container(); container.Configure(config => { config.AddRegistry(new StructuremapRegistry()); config.Populate(services); }); //Get an instance of ICommonLogService from container ICommonLogService CommonLogService = container.GetInstance<ICommonLogService>(); //Use CommonLogService here return container.GetInstance<IServiceProvider>(); }