In our team, we use a common database server. When running the Orchard Setup, I point the connection string to an existing Orchard Database and got this error message:
Setup failed: The requested service 'Orchard.IWorkContextAccessor' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.
The only way that can make setup successful for me is to point to an empty database. I attempted a workaround by doing so first, and then edit connection string in App_Data\Sites\Default\Settings.txt, but then I got the same error.