We are trying to build an iot edge module on windows 1809. Our Project folder hierarchy is as follows:
----BaseDir
|---ClassLibrary1
|---ClassLibrary2
|--references ClassLibrary1
|--references ClassLibrary3
|---ClassLibrary3
|--references ClassLibrary4
|--references ClassLibrary1
|---ClassLibrary4
|---OurIOTEdgeModule
|--references ClassLibrary2
Our docker file looks like this:
FROM microsoft/dotnet:2.1-sdk AS build-env
WORKDIR /app
COPY *.csproj ./
COPY ./NuGet.Config ./
RUN dotnet restore
COPY . ./
RUN dotnet publish -c Release -o out
FROM microsoft/dotnet:2.1-runtime-nanoserver-1809
WORKDIR /app
COPY --from=build-env /app/out ./
ENTRYPOINT ["dotnet", "IOTEdgeModule.dll"]
When we build this IOT Edge Module we are not getting any build errors. When we deploy the module on the EDGE device, we are facing the issue.
Our IOTEdgeModule is referencing ClassLibrary2.csproj. ClassLibrary2 inturn is referencing ClassLibrary3.csproj which in turn is referencing ClassLibrary4.csproj. Our IOT Edge module is only able to get the reference of ClassLibrary2.csproj but failing to refer all other dependant *.csprojs.
How to modify the docker file to solve this issue? Suggestions would be much appreciated.