2

Im struggling with azure app service. Everything seems to work perfectly but I can't build my project through Deployment Center. It looks like a solution with many projects is not recognised.

I've tried even to add into app settings variable "PROJECT" and within .deployment file. But it didn't help.

I've prepared two recipes to reproduce it.

This won't work

mkdir AzureProject && cd AzureProject &&
dotnet new sln --name AzureProject &&
dotnet new webapi --name WebApi &&
dotnet sln AzureProject.sln add WebApi/WebApi.csproj &&
git init &&
git add . &&
git commit -v &&
git remote add azure {azure_git_repo} &&
git push azure master

And this will

dotnet new webapi --name WebApi && 
cd WebApi git init && 
git add . && 
git commit -v && 
git remote add azure {azure_git_repo} && 
git push azure master

Here is the failing result:

TIME    ACTIVITY    LOG
11:08:26 AM Updating branch 'master'.   
11:08:27 AM Updating submodules.    
11:08:28 AM Preparing deployment for commit id '82434122e8'.    
Show Logs...
11:08:28 AM App container will begin restart within 10 seconds. 
Object reference not set to an instance of an object.

It works locally after running dotnet build.

Edit: I've tried to generate solution + project through Visual Studio 2019 and only add remote + push but same result.

Rafał Schmidt
  • 156
  • 2
  • 6

0 Answers0