azure-functions-templates icon indicating copy to clipboard operation
azure-functions-templates copied to clipboard

Update Visual Studio 2017's configuration wizard to update Application Settings

Open ColbyTresness opened this issue 5 years ago • 2 comments

From @rabrahamOpti on May 30, 2018 13:42

Current: When creating a Service Bus Queue Triggered Azure Function in Visual Studio 2017, the setup wizard prompts for a "Connection String Setting" for the service bus queue,. That setting is meant to map to a Key in Application Settings but does not prompt for the queue's connection string itself, and consequently doesn't update the Application Settings with the relevant Key / Value pair. A user that doesn't know to manually update this setting will find the function will not trigger if they deploy it.

Here's the relevant wizard modal:

relevant wizard modal

Which results in the following code being generated:

public static class Function1
{
    [FunctionName("Function1")]
    public static void Run([ServiceBusTrigger("myqueue", AccessRights.Manage, Connection = "MyServiceBusConnection")]string myQueueItem, TraceWriter log)
    {
        log.Info($"C# ServiceBus queue trigger function processed message: {myQueueItem}");
    }
}

A user needs to know to subsequently navigate to the function's Application Settings by right clicking the project, selecting "Publish", and clicking "Manage Application Settings..." in the Publish screen, and add a key value pair "MyServiceBusConnection" / "their queue's connection string"

Desired: The modal in the image should have another text field for the Service Bus Queue's connection string, and should automatically update the Application Setting to include the Key/Value pair.

Copied from original issue: Azure/Azure-Functions#824

ColbyTresness avatar Mar 14 '19 22:03 ColbyTresness

From @jeffhollan on June 14, 2018 22:16

Yes this feature is agreed and being tracked with the Visual Studio team. No timeline on ETA. Thanks for the input.

ColbyTresness avatar Mar 14 '19 22:03 ColbyTresness

@jeffhollan is this now complete?

ColbyTresness avatar Mar 14 '19 22:03 ColbyTresness