What you've accidentally done is added support for containerizing your web API in a Docker container. Follow this to remove that support.
- Remove lines that look like this from your
.csproj
files
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
- Remove these files if present, from solution and physical folder where the solution is homed.
docker-compose.dcproj
dockerfile
.
.dockerignore
Dockerfile.build
- Inside your project node there should be a
Properties\launchsettings.json
entry. Edit this to remove the "Docker"
JSON element.
Finally, close and reopen the solution to make sure there are no mistakes, rebuild, and try to run. The profile that gets run is defined in launchsettings.json
and is controlled by selecting the profile on the Debug toolbar (there may be other ways).
If none of that works, I suggest deleting (after backing up) and recreating the project without checking the Docker option.
csproj.user
file with a docker entry as theActiveDebugProfile
. So removing the csproj.user file solved the problem. – Pinfeather