AzureContainerApps@1 Multiple Projects

Copper Contributor

Hi All


I have a .Net Solution with multiple Projects. I am trying to use AzureContainerApps@1 to deploy via a Pipeline but I am struggling with the appSourcePath. If I leave as $(System.DefaultWorkingDirectory) I get an Ambiguous project error, if I specify the path to the project the build fails as cannot find the project references:


warning : The referenced project '../../../0.Build/xxxx/xxxx.csproj' does not exist. The code exist in a Github repo and all local builds etc work perfectly. Has anyone had similar issue and solved?




2 Replies
@RobTedTech I got these errors before but in Azure DevOps Pipelines not GitHub and not with ACA. I am guessing that your error might be cause by the ongoing issue I found, Please check it out and see if it helps it might be the same cause for GitHub



Thanks very much for the info. I managed to solve my issue by using a docker file. I have a a 'src' folder with the various projects, I created a 'dockerfiles' folder (both in the solution root directory) and used the following dockerfile:


FROM AS build-env

COPY . ../
RUN dotnet restore ../src/PROJECT_NAME/*.csproj
RUN dotnet publish ../src/PROJECT_NAME/*.csproj -c Release -o out

# Build runtime image
COPY --from=build-env /app/out .


Each Project will need a separate dockerfile in the folder but it builds perfectly with all dependencies.


Hope this helps somewhat.