How to fix 'does not exist in the current context'?

Be The Code 86 Reputation points
2021-09-24T09:17:40.667+00:00

In following the tutorial

everything seems fine until the test run occurs and I get the following error:

run.csx(61,19): error CS0103: The name 'RunAvailabilityTestAsync' does not exist in the current context

All code was copied from the examples in the tutorial so what could be going wrong? Thanks.

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,014 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,631 questions
0 comments No comments
{count} votes

Accepted answer
  1. Pierre-Luc Giguere 1,076 Reputation points
    2021-09-24T17:56:28.073+00:00

    Hi BeTheCode,

    I ran into the exact same problem while trying to replicate your issue. Turns out that App Service Editor truncated the runAvailabilityTest.csx to runAvailabilityTest.cs (missing the x). Why? I don't know, it just did.

    Can you double-check the name of the files?

    I did my troubleshoot based on the following article:

    https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/cs0103

    Don't forget to indicate if my answer solved your problem.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Be The Code 86 Reputation points
    2021-09-27T10:46:15.327+00:00

    Actually, I'm getting the same issue. Re-created all the files using the tutorial and checked all the names and still the same problem.