I'm setting up a new ASP.NET Core (version 3.1) web app. I have it hosted on Github and deployed to Azure App Service using Github Actions.
The deployment worked fine as long as I had a single project in the solution (the main ASP.NET Core project).
When I added a test project and set PROJECT=helloworld/helloworld.csproj in App Service configuration (as advised in documentation and also on a blog I found on the Internet), the deployment started to fail.
The Github Actions failure message says I should refer to logs for more details. I don't know where to get these logs.
The structure of my repository:
- helloworld (sln directory)
- helloworld.sln
- helloworld (main asp.net core project directory)
- helloworld.csproj
- tests
- helloworld.tests (test project directory)
- helloworld.tests.csproj
The Github Actions workflow definition is the basic one which was auto-generated when setting up the App Service:
...
- name: dotnet publish
run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp
- name: Deploy to Azure Web App
uses: azure/webapps-deploy@v1
with:
app-name: 'helloworld'
slot-name: 'production'
publish-profile: ${{ secrets.AzureAppService_PublishProfile_6941d41e13284fa890c1c34ffa8674e0 }}
package: ${{env.DOTNET_ROOT}}/myapp