question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'Function1' can't be invoked from Azure WebJobs SDK. Is it missing Azure WebJobs SDK attributes?

See original GitHub issue

Investigative information

Please provide the following:

  • Timestamp:
  • Function App version (1.0 or 2.0-beta): 1.0.11469
  • Invocation ID: “id”: “d2500522-4880-4dac-ac9a-720f635f3bc1”, “requestId”: “a116060e-1cfa-4d54-8ddd-6262a5b1e52c”,
  • Region: west europe

Repro steps

Invoke my app in the tester in the portal. Locally in my visual studio it works fine. I used the VS Extension Azure Functions and Web Jobs Tools to create my Function in VS and I used the version 15.0.40108. I used the .net framework standard 2.0 and the nuget packages Microsoft.NET.Sdk.Functions 1.0.7. I deployed over local git repo

Actual behavior

‘Function1’ can’t be invoked from Azure WebJobs SDK. Is it missing Azure WebJobs SDK attributes?

Related information

Provide any related information

  • c#
Source
public static class Function1
    {
        [FunctionName("Function1")]
        public static IActionResult Run([HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)]HttpRequest req, TraceWriter log)
        {
            log.Info("C# HTTP trigger function processed a request.");

            string name = req.Query["name"];

            string requestBody = new StreamReader(req.Body).ReadToEnd();
            dynamic data = JsonConvert.DeserializeObject(requestBody);
            name = name ?? data?.name;

            return name != null
                ? (ActionResult)new OkObjectResult($"Hello, {name}")
                : new BadRequestObjectResult("Please pass a name on the query string or in the request body");
        }
    }

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7

github_iconTop GitHub Comments

5reactions
cpiockcommented, Jan 19, 2018

ok found the solution. I have to change the runtime version in your function app settings to beta to work with .Net Standard 2.0. Maybe if for the tooling in visual studio is the default also the default in the azure function should be changed or reversed.

1reaction
cpiockcommented, May 23, 2018

@benmccallum i think I managed it by creating a new function app. By the way in my I FUNCTIONS_EXTENSION_VERSION have beta.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Functions - can't be invoked from Azure WebJobs SDK
I just had the same 'TestTrigger' can't be invoked from Azure WebJobs SDK. Is it missing Azure WebJobs SDK attributes?
Read more >
Solution to "can't be invoked from Azure WebJobs SDK. Is it ...
Here's the exception we are dealing with: can't be invoked from Azure WebJobs SDK. Is it missing Azure WebJobs SDK attributes? I got...
Read more >
How to use the WebJobs SDK - Azure App Service
This article provides guidance on how to work with the Azure WebJobs SDK. To get started with WebJobs right away, see Get started...
Read more >
Azure Functions - can't be invoked from Azure WebJobs SDK-C
i just had the same 'testtrigger' can't be invoked from azure webjobs sdk. is it missing azure webjobs sdk attributes?" -error in a...
Read more >
Azure Functions – can't be invoked from Azure WebJobs SDK
So I've been trying to create a simple azure function, that would be an http trigger "CreateUser". ... Is it missing Azure WebJobs...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found