cannot modify servicecollection after application is built