How should I reference a project in project file so Docker build finds the projects?
Project file:
<ItemGroup>
<ProjectReference Include="..\Assets.Core\Assets.Core.csproj" />
<ProjectReference Include="..\Creator.Components\Creator.Components.csproj" />
<ProjectReference Include="..\LC.Components.Core\LC.Components.Core.csproj" />
<ProjectReference Include="..\LC.Components\LC.Components.csproj" />
</ItemGroup>
Dockerfile:
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
WORKDIR /app
EXPOSE 80
EXPOSE 443
COPY *.csproj ./
RUN dotnet restore
COPY . ./
RUN dotnet publish -c Release -o out
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
WORKDIR /DIRPATH
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "Creator.Demo.dll"]
Output:
Determining projects to restore... Skipping project "C:\Assets.Core\Assets.Core.csproj" because it was not found.
Skipping project "C:\Creator.Components\Creator.Components.csproj" because it was not found. Skipping project "C:\LC.Components.Core\LC.Components.Core.csproj" because it was not found. Skipping project "C:\LC.Components\LC.Components.csproj" because it was not found. Skipping project "C:\Assets.Core\Assets.Core.csproj" because it was not found.
Skipping project "C:\Creator.Components\Creator.Components.csproj" because it was not found. Skipping project "C:\LC.Components.Core\LC.Components.Core.csproj" because it was not found. Skipping project "C:\LC.Components\LC.Components.csproj" because it was not found. Restored C:\app\creator.demo.csproj (in 282 ms).