Search code examples
azurevisual-studio-2013azure-webjobssdk

Microsoft azure project name grayed out


In Visual Studio 2013.3 when adding azure webjob the project name is grayed out.

When I click OK it says:

Unable to create a WebJob. Value cannot be null. Parameter name: project

Azure project name


Solution

  • It looks like it's a bug in the way the template is initially created if you go through Add > New Project instead of right click on a Website and clicking "Add New Webjob".

    The window you're seeing is, in fact, not a publish window. It's a "Create Web Job Project" window. It's doing that because it's confused from this missing file I guess?

    Anyway it's missing a webjob-publish-settings.json file under the Properties of the project.

    Mine basically has this:

    {
      "$schema": "http://schemastore.org/schemas/json/webjob-publish-settings.json",
      "webJobName": "MyWebjob",
      "startTime": "2014-08-10T00:00:00-08:00",
      "endTime": null,
      "jobRecurrenceFrequency": "Day",
      "interval": 1,
      "runMode": "Scheduled"
    }
    

    Edit: I added this file to my project and it still really wasn't enough. My recommendation is to go to your existing web site, right click, select "Add > New Azure WebJobs Project" and recreate the project that way. I'm not exactly certain what it's missing, but doing it any other way is apparently bugged.