title: Why doesn't the .Net Core / Azure Web Job example work?
body: <p>I am attempting to create a web job that runs on a manual trigger (using .Net Core 2.1 and Azure SDK 3.x). I am simply copying/pasting the code from the example (Manual Trigger) to just get a working starting point. However, when I run the sample (locally as well as on my test server in Azure), I get this error:</p>
  
  <blockquote>
    <p>'CreateQueueMessage' can't be invoked from Azure WebJobs SDK. Is it
    missing Azure WebJobs SDK attributes?'</p>
  </blockquote>
  
  <p>I have created the azure web job (.Net Core console app) just as it describes in the docs, and I am using the manual trigger (and host) code from the examples verbatim. Is this a bug, or is there something else I need to do?</p>
  
  <p>Here are the docs:
  <a href="https://docs.microsoft.com/en-us/azure/app-service/webjobs-sdk-how-to#triggers" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/app-service/webjobs-sdk-how-to#triggers</a></p>
  
  <p>Here is the code I am using in my project:</p>
  
  <pre><code>using Microsoft.Azure.WebJobs;
  using Microsoft.Extensions.Hosting;
  using Microsoft.Extensions.Logging;
  using System.Collections.Generic;
  using System.Threading.Tasks;
  
  namespace PubSubTrigger
  {
      class Program
      {
          [NoAutomaticTrigger]
          public static void CreateQueueMessage(ILogger logger, string value, Queue("outputqueue")] out string message)
          {
              message = value;
              logger.LogInformation("Creating queue message: ", message);
          }
          static async Task Main(string[] args)
          {
              var builder = new HostBuilder();
              builder.ConfigureWebJobs(b =&gt;
              {
                  b.AddAzureStorageCoreServices();
                  b.AddAzureStorage();
              });
              var host = builder.Build();
              using (host)
              {
                  var jobHost = host.Services.GetService(typeof(IJobHost)) as JobHost;
                  var inputs = new Dictionary&lt;string, object&gt;
                  {
                      { "value", "Hello world!" }
                  };
  
                  await host.StartAsync();
                  await jobHost.CallAsync("CreateQueueMessage", inputs);
                  await host.StopAsync();
              }
          }
      }
  }
  
  </code></pre>
  
  <p>As an additional note, I did find a similar issue posted on SO:
  <a href="https://stackoverflow.com/questions/49769973/azure-functions-cant-be-invoked-from-azure-webjobs-sdk">Azure Functions - can&#39;t be invoked from Azure WebJobs SDK</a></p>
  
  <p>However, changing the target framework (to .netstandard) isn't in any part of the Microsoft docs. And I would find it odd that the docs would direct me to specifically create a .net console azure web jobs app, only to change it to .netstandard later. And, just for kicks, I did try that solution, but it produced an entirely different error:</p>
  
  <blockquote>
    <p>The target process exited without raising a CoreCLR started event.
    Ensure that the target process is configured to use .NET Core. This
    may be expected if the target process did not run on .NET Core.</p>
  </blockquote>
  
  <p>So I think this other post is a different issue.</p>