1
votes

I have a function app project in multi project visual studio solution. I have an ARM template set up with GitHub as the source:

"properties": {
"RepoUrl": "[parameters('funcapp_reponame')]",
"branch": "[parameters('funcapp_branch')]",
"IsManualIntegration": true,

}

I have also added the following to deploy from the function app project:

"siteConfig": {
"appSettings": [
{
    "name": "Project",
    "value": "ProjectName"
}]

},

The template successfully creates the Function app resource, but not the functions. Looking at the deployment error log in the Azure portal I get:

'D:\home\site\repository\ProjectName\ProjectName.csproj' is not a deployable project

Looking at the files copied to Azure via FTP I can see that the full solution has been copied over and the deployment process looks to be selecting the correct folder. Is the presence of the .csproj causing the issue? The various example ARM templates for deploying functions on github don't appear to use visual studio projects.

1
It works with my test function app github.com/davidebbo-test/FunctionAppVS2017. Could you share a repo that demonstrates the issue? Also, can you share your function app name, either directly or indirectly? This will help us investigate. Thanks! - David Ebbo
Hi. Thanks again for the response. I deleted the resource group yesterday and tried running the ARM template again so you could see the app. This time it worked fine! Unfortunately as I deleted the resource group I guess we have deleted the log of the previous deployment failure. - Paul
Odd. If you see this again, let me know and we'll take a look. - David Ebbo
@DavidEbbo I tried a deployment to a new subscription and had this issue again. As suggested in the contact your team indirectly I created a temp function app in the same resource group and copied the log: 2018-01-03T14:39:00.189 Function started (Id=f1677d90-4861-4cf3-9c17-5747d2efb92e). The other function app in the resource group is the one with the issue. - Paul

1 Answers

0
votes

In your Function App's csproj, you have:

<ItemGroup>
  <PackageReference Include="Microsoft.Azure.WebJobs" Version="2.1.0-beta1" />
  <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Http" Version="1.0.0-beta1" />
  <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.0-alpha6" />
</ItemGroup>

So it's referencing a very old Microsoft.NET.Sdk.Functions package. In your project, go to Manage NuGet Packages, and update to the latest, which right now is 1.0.7. Also, make sure to install any relevant VS updates under Tools / Extension and Updates.