Hi there
In Visual Solution I can build my project successfully. Nevertheless, when I start publishing it to a Docker Hub, it throws
NNNN\CIT Web Service\Models\ConfigModel.cs(22,37): error CS0234: The type or namespace name ‘Config’ does not exist in the namespace ‘NNNN.PaymentTransactionEngine’ (are you missing an assembly reference?) [NNNN\CIT Web Service\CIT Web Service.csproj]
My Docker file is as follows:
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /src
COPY [“CIT Web Service/CIT Web Service.csproj”, “CIT Web Service/”]
RUN dotnet restore “CIT Web Service/CIT Web Service.csproj”
COPY . .
WORKDIR “/src/CIT Web Service”
RUN dotnet build “CIT Web Service.csproj” -c Release -o /app/build
FROM build AS publish
RUN dotnet publish “CIT Web Service.csproj” -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT [“dotnet”, “CIT Web Service.dll”]
The row, causing the problem, is shown with icon.
What could be a reason for the problem?
Thanks.