You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-create-your-first-function-visual-studio.md
+5-8Lines changed: 5 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,9 +17,7 @@ ms.tgt_pltfrm: multiple
17
17
ms.workload: na
18
18
ms.date: 05/22/2018
19
19
ms.author: glenga
20
-
ms.custom: mvc, devcenter
21
-
experimental: true
22
-
experiment_id: 23113853-34f2-4f
20
+
ms.custom: mvc, devcenter, 23113853-34f2-4f
23
21
24
22
---
25
23
# Create your first function using Visual Studio
@@ -90,9 +88,8 @@ You must have a function app in your Azure subscription before you can publish y
90
88
91
89
## Next steps
92
90
93
-
You have used Visual Studio to create and publish a C# function app with a simple HTTP triggered function.
94
-
95
-
* To learn how to configure your project to support other types of triggers and bindings, see the [Configure the project for local development](functions-develop-vs.md#configure-the-project-for-local-development) section in [Azure Functions Tools for Visual Studio](functions-develop-vs.md).
96
-
* To learn more about local testing and debugging using the Azure Functions Core Tools, see [Code and test Azure Functions locally](functions-run-local.md).
97
-
* To learn more about developing functions as .NET class libraries, see [Using .NET class libraries with Azure Functions](functions-dotnet-class-library.md).
91
+
You have used Visual Studio to create and publish a C# function app with a simple HTTP triggered function.
98
92
93
+
*[Learn how to add input and output bindings that integrate with other services.](functions-develop-vs.md#add-bindings)
94
+
*[Learn more about local testing and debugging using the Azure Functions Core Tools.](functions-run-local.md#vs-debug)
95
+
*[Learn more about developing functions as .NET class libraries](functions-dotnet-class-library.md).
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-develop-vs.md
+48-19Lines changed: 48 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ ms.workload: na
12
12
ms.tgt_pltfrm: dotnet
13
13
ms.devlang: na
14
14
ms.topic: article
15
-
ms.date: 03/13/2018
15
+
ms.date: 05/23/2018
16
16
ms.author: glenga
17
17
---
18
18
# Azure Functions Tools for Visual Studio
@@ -27,7 +27,7 @@ The Azure Functions Tools provides the following benefits:
27
27
* Develop and deploy pre-compiled C# functions. Pre-complied functions provide a better cold-start performance than C# script-based functions.
28
28
* Code your functions in C# while having all of the benefits of Visual Studio development.
29
29
30
-
This topic shows you how to use the Azure Functions Tools for Visual Studio 2017 to develop your functions in C#. You also learn how to publish your project to Azure as a .NET assembly.
30
+
This article shows you how to use the Azure Functions Tools for Visual Studio 2017 to develop your functions in C#. You also learn how to publish your project to Azure as a .NET assembly.
31
31
32
32
> [!IMPORTANT]
33
33
> Don't mix local development with portal development in the same function app. When you publish from a local project to a function app, the deployment process overwrites any functions that you developed in the portal.
@@ -70,15 +70,15 @@ To create and deploy functions, you also need:
70
70
71
71
4. After the update is complete, choose **Close** and restart Visual Studio.
72
72
73
-
## Create an Azure Functions project
73
+
## Create an Azure Functions project
74
74
75
75
[!INCLUDE [Create a project using the Azure Functions](../../includes/functions-vstools-create.md)]
76
76
77
77
The project template creates a C# project, installs the `Microsoft.NET.Sdk.Functions` NuGet package, and sets the target framework. Functions 1.x targets the .NET Framework, and Functions 2.x targets .NET Standard. The new project has the following files:
78
78
79
79
***host.json**: Lets you configure the Functions host. These settings apply both when running locally and in Azure. For more information, see [host.json reference](functions-host-json.md).
80
-
81
-
***local.settings.json**: Maintains settings used when running functions locally. These settings are not used by Azure, they are used by the [Azure Functions Core Tools](functions-run-local.md). Use this file to specify settings, such as connection strings to other Azure services. Add a new key to the **Values** array for each connection required by functions in your project. For more information, see [Local settings file](functions-run-local.md#local-settings-file) in the Azure Functions Core Tools topic.
80
+
81
+
***local.settings.json**: Maintains settings used when running functions locally. These settings are not used by Azure, they are used by the [Azure Functions Core Tools](functions-run-local.md). Use this file to specify app settings for variables required by your functions. Add a new item to the **Values** array for each connection required by the functions bindings in your project. For more information, see [Local settings file](functions-run-local.md#local-settings-file) in the Azure Functions Core Tools article.
82
82
83
83
For more information, see [Functions class library project](functions-dotnet-class-library.md#functions-class-library-project).
84
84
@@ -90,7 +90,7 @@ The Functions runtime uses an Azure Storage account internally. For all trigger
90
90
91
91
To set the storage account connection string:
92
92
93
-
1. In Visual Studio, open **Cloud Explorer**, expand **Storage Account** > **Your Storage Account**, then select **Properties** and copy the **Primary Connection String** value.
93
+
1. In Visual Studio, open **Cloud Explorer**, expand **Storage Account** > **Your Storage Account**, then select **Properties** and copy the **Primary Connection String** value.
94
94
95
95
2. In your project, open the local.settings.json file and set the value of the **AzureWebJobsStorage** key to the connection string you copied.
96
96
@@ -104,37 +104,66 @@ In pre-compiled functions, the bindings used by the function are defined by appl
104
104
105
105
2. Choose your trigger, set the binding properties, and click **Create**. The following example shows the settings when creating a Queue storage triggered function.
This trigger example uses a connection string with a key named **QueueStorage**. This connection string setting must be defined in the local.settings.json file.
110
-
111
-
3. Examine the newly added class. You see a static **Run** method, that is attributed with the **FunctionName** attribute. This attribute indicates that the method is the entry point for the function.
107
+

108
+
109
+
This trigger example uses a connection string with a key named **QueueStorage**. This connection string setting must be defined in the local.settings.json file.
110
+
111
+
3. Examine the newly added class. You see a static **Run** method, that is attributed with the **FunctionName** attribute. This attribute indicates that the method is the entry point for the function.
112
112
113
113
For example, the following C# class represents a basic Queue storage triggered function:
2. AddtheappropriateNuGetextensionpackagefor the specific binding. For more information, see [Local C# development using Visual Studio](functions-triggers-bindings.md#local-csharp) intheTriggersandBindingsarticle. Thebinding-specificNuGetpackagerequirementsarefoundinthereferencearticlefor the binding. For an example, see the [Queue storage bindings article](functions-bindings-storage-queue.md#packages).
141
+
142
+
3. Ifthereareappsettingsthatthebindingneeds, addthemtothe**Values**collectioninthe [localsettingfile](functions-run-local.md#local-settings-file). Thesevaluesareusedwhenthefunctionrunslocally. WhenthefunctionrunsinthefunctionappinAzure, the [functionappsettings](#function-app-settings) areused.
0 commit comments