My dockerfile uses an intermediate build container, as the msft docs suggest. So when appveyor calls the docker build command it is doing the build inside of the exact same environment that I do it in when I also call docker build locally. So this is one case where I dont feel totally awful saying 'it works on my machine.'
#start with the sdk image, this is where we will perform the build.
FROM microsoft/dotnet:2.1-sdk AS build
#copy csproj and restore as distinct layers
COPY *.sln .
COPY src/ListenerCore/*.csproj ./src/ListenerCore/
COPY TestApp/*.csproj ./TestApp/
RUN dotnet restore
#copy everything else and build app
COPY src/ListenerCore/. ./src/ListenerCore/
RUN dotnet publish -c Release -o out
FROM microsoft/dotnet:2.1.5-aspnetcore-runtime AS runtime
COPY --from=build /app/src/ListenerCore/out ./
ENTRYPOINT ["dotnet", "Synovia.Core.Listener.dll"]
FWIW - I RDP'd in and look, but like I said the build is done inside an intermediate container. That being said, I also ran dotnet build -c Release while I was RDP'd in and it worked well.
Is it possible for you to a create a simple "Hello-world" repro project in a public repository? Understanding the structure of your project would help a lot. Is it a single assembly project or assembly project plus test console app using it?