title: Where is the "Startup Code" in an Azure Fuctions project?
body: <p>I'm trying to write an Azure Function that uses the ServiceBus bindings as a trigger. I've upgraded everything to netstandard 2.0 and the pre-release v3.0 versions of the WebJobs packages, so I have everything building correctly and generating the metadata etc.</p>
  
  <p>When I try to run the project, the Azure Functions host starts up but complains that I have no functions defined, and suggests I might have to configure custom bindings manually in the startup code. I also get a null reference error related to the function I'm trying to deploy, which I suspect may also be caused by the unknown trigger binding attribute.</p>
  
  <p>I know that the Service Bus bindings are <em>not</em> built in anymore, and need to be registered, but I have no idea where I'm supposed to do this. My project is just a class library, it has no "startup code".</p>
  
  <p>This is what I get when I start up the project:</p>
  
  <pre><code>[1/5/2018 4:15:46 PM] A function whitelist has been specified, excluding all but the following functions: [ProcessCheckRecognition, ImageConversion]
  [1/5/2018 4:15:47 PM] Generating 0 job function(s)
  [1/5/2018 4:15:47 PM] Starting Host (HostId=9f4ea53c5136457d883d685e57164f08, Version=2.0.11353.0, ProcessId=12424, Debug=False, Attempt=0, FunctionsExtensionVersion=)
  Listening on http://localhost:7071/
  Hit CTRL-C to exit...
  [1/5/2018 4:15:47 PM] No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. config.UseServiceBus(), config.UseTimers(), etc.).
  [1/5/2018 4:15:47 PM] Job host started
  [1/5/2018 4:15:47 PM] The following 1 functions are in error:
  [1/5/2018 4:15:47 PM] ProcessCheckRecognition: Object reference not set to an instance of an object.
  </code></pre>
  
  <p>Here's my function class:</p>
  
  <pre><code>public static class JobResponse
  {
      [FunctionName("ProcessJobResponse")]
      public static void Run([ServiceBusTrigger("ktl-jobresponse")]ResponseMessage message, TraceWriter log)
      {
      }
  }
  </code></pre>
  
  <p>And the function.json that is generated on build:</p>
  
  <pre><code>{
    "generatedBy": "Microsoft.NET.Sdk.Functions.Generator-1.0.7",
    "configurationSource": "attributes",
    "bindings": [
      {
        "type": "serviceBusTrigger",
        "queueName": "ktl-jobresponse",
        "name": "message"
      }
    ],
    "disabled": false,
    "scriptFile": "../bin/KutuluWare.Functions.dll",
    "entryPoint": "KutuluWare.Functions.JobResponse.Run"
  }
  </code></pre>
  
  <p>Am I supposed to be calling <code>config.UseServiceBus()</code> somewhere, and if so, where is that code expected to live?</p>