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-reference-csharp.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,11 +28,11 @@ Data flows into your C# function via method arguments. Argument names are specif
28
28
29
29
The *.csx* format allows you to write less "boilerplate" and focus on writing just a C# function. Instead of wrapping everything in a namespace and class, just define a `Run` method. Include any assembly references and namespaces at the beginning of the file as usual.
30
30
31
-
A function app's *.csx* files are compiled when an instance is initialized. This compilation step means things like cold start may take longer for C# script functions compared to C# class libraries. This compilation step is also why C# script functions are editable in the Azure portal, while C# class libraries are not.
31
+
A function app's *.csx* files are compiled when an instance is initialized. This compilation step means things like cold start may take longer for C# script functions compared to C# class libraries. This compilation step is also why C# script functions are editable in the Azure portal, while C# class libraries aren't.
32
32
33
33
## Folder structure
34
34
35
-
The folder structure for a C# script project looks like the following:
35
+
The folder structure for a C# script project looks like the following example:
36
36
37
37
```
38
38
FunctionsProject
@@ -51,7 +51,7 @@ FunctionsProject
51
51
52
52
There's a shared [host.json](functions-host-json.md) file that can be used to configure the function app. Each function has its own code file (.csx) and binding configuration file (function.json).
53
53
54
-
The binding extensions required in [version 2.x and later versions](functions-versions.md) of the Functions runtime are defined in the `extensions.csproj` file, with the actual library files in the `bin` folder. When developing locally, you must [register binding extensions](./functions-bindings-register.md#extension-bundles). When developing functions in the Azure portal, this registration is done for you.
54
+
The binding extensions required in [version 2.x and later versions](functions-versions.md) of the Functions runtime are defined in the `extensions.csproj` file, with the actual library files in the `bin` folder. When developing locally, you must [register binding extensions](./functions-bindings-register.md#extension-bundles). When you develop functions in the Azure portal, this registration is done for you.
55
55
56
56
## Binding to arguments
57
57
@@ -373,7 +373,7 @@ The following assemblies may be referenced by simple-name, by runtime version:
373
373
374
374
---
375
375
376
-
In code, assemblies are referenced like the following:
376
+
In code, assemblies are referenced like the following example:
377
377
378
378
```csharp
379
379
#r"AssemblyName"
@@ -403,7 +403,7 @@ By default, the [supported set of Functions extension NuGet packages](functions-
403
403
404
404
If for some reason you can't use extension bundles in your project, you can also use the Azure Functions Core Tools to install extensions based on bindings defined in the function.json files in your app. When using Core Tools to register extensions, make sure to use the `--csx` option. To learn more, see [Install extensions](functions-run-local.md#install-extensions).
405
405
406
-
By default, Core Tools reads the function.json files and adds the required packages to an *extensions.csproj* C# class library project file in the root of the function app's file system (wwwroot). Because Core Tools uses dotnet.exe, you can use it to add any NuGet package reference to this extensions file. During installation, Core Tools builds the extensions.csproj to install the required libraries. Here is an example *extensions.csproj* file that adds a reference to *Microsoft.ProjectOxford.Face* version *1.1.0*:
406
+
By default, Core Tools reads the function.json files and adds the required packages to an *extensions.csproj* C# class library project file in the root of the function app's file system (wwwroot). Because Core Tools uses dotnet.exe, you can use it to add any NuGet package reference to this extensions file. During installation, Core Tools builds the extensions.csproj to install the required libraries. Here's an example *extensions.csproj* file that adds a reference to *Microsoft.ProjectOxford.Face* version *1.1.0*:
407
407
408
408
```xml
409
409
<ProjectSdk="Microsoft.NET.Sdk">
@@ -418,7 +418,7 @@ By default, Core Tools reads the function.json files and adds the required packa
418
418
419
419
# [v1.x](#tab/functionsv1)
420
420
421
-
Version 1.x of the Functions runtime uses a *project.json* file to define dependencies. Here is an example *project.json* file:
421
+
Version 1.x of the Functions runtime uses a *project.json* file to define dependencies. Here's an example *project.json* file:
422
422
423
423
```json
424
424
{
@@ -438,7 +438,7 @@ Extension bundles aren't supported by version 1.x.
438
438
439
439
To use a custom NuGet feed, specify the feed in a *Nuget.Config* file in the function app root folder. For more information, see [Configuring NuGet behavior](/nuget/consume-packages/configuring-nuget-behavior).
440
440
441
-
If you are working on your project only in the portal, you'll need to manually create the extensions.csproj file or a Nuget.Config file directly in the site. To learn more, see [Manually install extensions](functions-how-to-use-azure-function-app-settings.md#manually-install-extensions).
441
+
If you're working on your project only in the portal, you'll need to manually create the extensions.csproj file or a Nuget.Config file directly in the site. To learn more, see [Manually install extensions](functions-how-to-use-azure-function-app-settings.md#manually-install-extensions).
defines the [Storage blob](functions-bindings-storage-blob.md) input or output binding, and
509
509
[TextWriter](/dotnet/api/system.io.textwriter) is a supported output binding type.
510
510
511
-
### Multiple attribute example
511
+
### Multiple attributes example
512
512
513
513
The preceding example gets the app setting for the function app's main Storage account connection string (which is `AzureWebJobsStorage`). You can specify a custom app setting to use for the Storage account by adding the
0 commit comments