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
This article is an introduction to developing Azure Functions by using C# script (*.csx*).
14
14
15
-
Azure Functions supports C# and C# script programming languages. If you're looking for guidance on [using C# in a Visual Studio class library project](functions-develop-vs.md), see [C# developer reference](functions-dotnet-class-library.md).
15
+
Azure Functions lets you develop functions using C# in one of the following ways:
16
+
17
+
| Type | Execution process | Code extension | Development environment | Reference |
| C# class library | in-process | .cs | Visual Studio<br/>Visual Studio Code<br />Core Tools |[In-process C# class library functions](functions-dotnet-class-library.md)|
21
+
| C# class library (isolated process)| out-of-process | .cs | Visual Studio<br/>Visual Studio Code<br />Core Tools |[.NET isolated process functions](dotnet-isolated-process-guide.md)|
16
22
17
23
This article assumes that you've already read the [Azure Functions developers guide](functions-reference.md).
18
24
19
25
## How .csx works
20
26
21
-
The C# script experience for Azure Functions is based on the [Azure WebJobs SDK](https://github.com/Azure/azure-webjobs-sdk/wiki/Introduction). Data flows into your C# function via method arguments. Argument names are specified in a `function.json` file, and there are predefined names for accessing things like the function logger and cancellation tokens.
27
+
Data flows into your C# function via method arguments. Argument names are specified in a `function.json` file, and there are predefined names for accessing things like the function logger and cancellation tokens.
22
28
23
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.
24
30
@@ -350,19 +356,29 @@ The following assemblies are automatically added by the Azure Functions hosting
350
356
*`System.Web.Http`
351
357
*`System.Net.Http.Formatting`
352
358
353
-
The following assemblies may be referenced by simple-name (for example, `#r "AssemblyName"`):
359
+
The following assemblies may be referenced by simple-name, by runtime version:
360
+
361
+
# [Version 2.x+](#tab/v2)
354
362
355
-
Functions V2 and V3:
356
363
*`Newtonsoft.Json`
357
364
*`Microsoft.WindowsAzure.Storage`
358
365
359
-
Functions V1:
366
+
# [Version 1.x](#tab/v1)
367
+
360
368
*`Newtonsoft.Json`
361
369
*`Microsoft.WindowsAzure.Storage`
362
370
*`Microsoft.ServiceBus`
363
371
*`Microsoft.AspNet.WebHooks.Receivers`
364
372
*`Microsoft.AspNet.WebHooks.Common`
365
373
374
+
---
375
+
376
+
In code, assemblies are referenced like the following:
377
+
378
+
```csharp
379
+
#r"AssemblyName"
380
+
```
381
+
366
382
## Referencing custom assemblies
367
383
368
384
To reference a custom assembly, you can use either a *shared* assembly or a *private* assembly:
0 commit comments