Azure / Azure/azure-functions-host

C# script can't resolve Azure.Core

Open
#7,809 6 comments 0 reactions 0 assignees View on GitHub
needs-investigation
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

If binding to `BlobClient` I can't use APIs that return `Response<>` that's coming from `Azure.Core`

![image](https://user-images.githubusercontent.com/61715331/139120114-e2e08635-db39-46dc-9d37-b789e8ba47c8.png)

run.csx:
```
#r "Azure.Storage.Blobs"
#r "Azure.Core"
#r "System.Memory.Data"

using Azure.Storage.Blobs;
using Azure.Core

public static void Run(BlobClient myBlob, string name, ILogger log)
{
var props = myBlob.GetProperties();
log.LogInformation($"C# Blob trigger function Processed blob\n Name:{name} \n Some: {props.BlobType}");
}

```

function.json
```
{
"bindings": [
{
"name": "myBlob",
"type": "blobTrigger",
"direction": "in",
"path": "samples-workitems/{name}",
"connection": "kasobolcanadacentral_STORAGE"
}
]
}
```

host.json
```
{
"version": "2.0",
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[3.3.0, 4.0.0)"
}
}
```

Contributor guide

Open the contributing guide

Research direction

Start with the run.csx references and the function.json binding, then compare them with the host.json extensionBundle configuration. Reproduce the BlobClient.GetProperties() case involving Azure.Core and determine how the C# script resolves that dependency; done means the shown script can use the Response type without the resolution failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
backend, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.