Reputation: 2716
I am using Visual Studio to develop my C# Azure Functions. I attempt to publish my Azure Function to the cloud, and encounter this message in the screenshot. My Azure Function App has created and in the started state, so that is not the issue.
What is the cause of this error? Or is there any other way to get a more descriptive error message?
Upvotes: 3
Views: 283
Reputation: 11
it works!
Upvotes: 1
Reputation: 2716
The issue ended up being that I was using #if
in the Azure function in this way:
namespace Common.Utils
{
using System;
using System.Net.Http;
using System.Threading.Tasks;
#if DEBUG
using Microsoft.Azure.KeyVault;
using Microsoft.Azure.KeyVault.Models;
using Microsoft.Azure.Services.AppAuthentication;
using Microsoft.IdentityModel.Clients.ActiveDirectory;
#endif
.....
While the above worked in both Debug and Release modes while I was testing locally, it didn't work in the cloud.
Upvotes: 1