title | description | author | manager | editor | services | documentationcenter | ms.assetid | ms.service | ms.workload | ms.tgt_pltfrm | ms.devlang | ms.topic | ms.date | ms.author |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Build Azure Logic Apps in Visual Studio | Microsoft Docs |
Create a project in Visual Studio to create and deploy your logic app. |
jeffhollan |
anneta |
logic-apps |
e484e5ce-77e9-4fa9-bcbe-f851b4eb42a6 |
logic-apps |
integration |
na |
na |
article |
10/18/2016 |
jehollan |
Although the Azure portal gives you a great way to design and manage your Logic apps, you may also want to design and deploy your logic app from Visual Studio instead. Logic Apps comes with a rich Visual Studio toolset, which allows you to build a logic app using the designer, configure any deployment and automation templates, and deploy into any environment.
Below are the steps to install and configure the Visual Studio tools for Logic Apps.
- Visual Studio 2015
- Latest Azure SDK (2.9.1 or greater)
- Azure PowerShell
- Access to the web when using the embedded designer
Once you have the prerequisites installed,
- Open Visual Studio 2015 to the Tools menu and select Extensions and Updates
- Select the Online category to search online
- Search for Logic Apps to display the Azure Logic Apps Tools for Visual Studio
- Click the Download button to download and install the extension
- Restart Visual Studio after installation
Note
You can also download the extension directly from this link
Once installed you are able to use the Azure Resource Group project with the Logic App Designer.
-
Go to the File menu and select New > Project (or, you can go to Add and then select New project to add it to an existing solution):
-
In the dialog, find Cloud, and then select Azure Resource Group. Type a Name and then click OK.
-
Select the Logic app template. This creates a blank logic app deployment template to start with.
-
Once you have selected your Template, hit OK.
Now your Logic app project is added to your solution. You should see the deployment file in the Solution Explorer:
Once you have an Azure Resource Group project that contains a logic app, you can open the designer within Visual Studio to assist you in creating the workflow. The designer requires an internet connection to query the connectors for available properties and data (for example, if using the Dynamics CRM Online connector, the designer queries your CRM instance to list available custom and default properties).
- Right-click on the
<template>.json
file and select Open with Logic App Designer (orCtrl+L
) - Choose the subscription, resource group, and location for the deployment template
-
It's important to note that designing a logic app will create API Connection resources to query for properties during design. The resource group selected is used to create those connections during design-time. You can view or modify any API Connections by going to the Azure portal and browsing for API Connections.
-
- The designer should render based on the definition in the
<template>.json
file. - You can now create and design your logic app, and changes are updated in the deployment template.
Microsoft.Web/connections
resources are added to your resource file for any connections needed for the logic app to function. These connection properties can be set when you deploy, and managed after you deploy in API Connections in the Azure portal.
You can select the Code View tab on the bottom of the designer to switch to the JSON representation of the logic app. To switch back to the full resource JSON, right-click the <template>.json
file and select Open.
You can save the logic app at anytime via the Save button or Ctrl+S
. If there are any errors with your logic app at the time you save, they are displayed in the Outputs window of Visual Studio.
Finally, after you have configured your app, you can deploy directly from Visual Studio in just a couple steps.
-
Right-click on the project in the Solution Explorer and go to Deploy > New Deployment...
-
You are prompted to sign in to your Azure subscription(s).
-
Now you need to choose the details of the resource group that you want to deploy the Logic app to.
[!NOTE] Be sure to select the right template and parameters files for the resource group (for example if you are deploying to a production environment you'll want to choose the production parameters file).
-
Select the Deploy button
-
The status of the deployment appears in the Output window (you may need to choose Azure Provisioning.
In the future, you can revise your Logic app in source control and use Visual Studio to deploy new versions.
Note
If you modify the definition in the Azure portal directly, then the next time you deploy from Visual Studio those changes will be overwritten.
If you have an existing Resource Group project, then adding a logic app to it, or adding another logic app along side the one you previously created, can be done through the JSON Outline window.
-
Open the
<template>.json
file. -
Open the JSON Outline window. The JSON Outline window can be found under View > Other Windows > JSON Outline.
-
To add a resource to the template file, either click the Add Resource button on the top of the JSON Outline window or right-click on resources and select Add New Resource.
-
In the Add Resource dialog box browse and select Logic App, give it a name and select Add.
- To get started with Logic Apps, follow the create a Logic App tutorial.
- View common examples and scenarios
- You can automate business processes with Logic Apps
- Learn How to Integrate your systems with Logic Apps