Share via

Cannot publish Azure Function from Visual Studio 2022

Constantin Dragomirov 0 Reputation points
2026-03-01T16:13:36.3033333+00:00

Cannot publish Azure Function from Visual Studio 2022.
Created function according "https://learn.microsoft.com/en-us/azure/azure-functions/functions-develop-vs?pivots=isolated".

Function works locally.

Follow instruction on publishing function to Azure and cannot create new Function App ("Create" button is disable)

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.

{count} votes

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2026-03-01T16:13:45.7166667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The Create button is disabled when one or more required settings for the new Function App are invalid or incompatible. For Functions created from Visual Studio using the isolated worker model, the Flex Consumption plan has specific requirements that commonly cause this behavior.

    Check and correct these settings in the Create Function App dialog in Visual Studio:

    1. Plan type selection bug (Flex Consumption)
      When targeting a Flex Consumption plan, the dialog requires a specific sequence:
      • First select App Service plan.
      • Then reselect Flex Consumption.
        This clears a known issue with the dialog that otherwise keeps Create disabled.
    2. Operating system must be Linux for Flex Consumption
      • Ensure Operating system is set to Linux.
      • Flex Consumption currently requires Linux; if Windows is selected with Flex Consumption, the configuration is invalid and the Create button remains grayed out.
    3. Region must support Flex Consumption
    4. Required fields must be valid
      Verify all required fields in the dialog:
      • Name: must be globally unique and use only a-z, 0-9, and -.
      • Subscription: a valid subscription must be selected.
      • Resource group: select an existing one or create a new one.
      • Azure Storage: select or create a general-purpose storage account that meets the storage account requirements.
      • Application Insights: either create a new instance or select an existing one.
    5. Instance memory size
      • For Flex Consumption, ensure Instance memory size is set to a valid value such as 2048, as shown in the guidance.

    After correcting these settings, the Create button should become enabled. Then:

    1. Select Create to provision the Function App and related resources.
    2. Select Finish to complete publish profile creation.
    3. On the publish profile page, select Publish to deploy the function.
    4. Optionally, from the Hosting section, use ... → Open in Azure portal to verify the Function App in the Azure portal.

    References:


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.