none
Error publishing an V2 Azure Function from VS 2019 RRS feed

  • Question

  • I've created an Azure Functions project in .Net Core and just add a HttpTrigger function. When I try to publish it from Visual Studio 2019 (to an exiting function or a new one), I get an error.

    2>The "UserAgentVersion" parameter is not supported by the "ZipDeployTask" task. Verify the parameter exists on the task, and it is a settable public instance property.

    2>The "ZipDeployTask" task could not be initialized with its input parameters.

    I've also created a project in .Net Standard and I am able to publish it successfully. I am only getting the error for V2 functions.
    Monday, September 9, 2019 8:56 AM

All replies

  • Hello Anca,

    Are you deploying function to a new Function App or Existing one  ?

    Monday, September 9, 2019 10:21 AM
    Moderator
  • Hi,

    I've tried both, deploying to a new Function App and to and exiting one, I am getting the same error. I've even created a Function App in the portal and add a HttpTrigger function to it and then deploy, but it failed. 


    Monday, September 9, 2019 11:03 AM
  • Hello Anca,

    We apologize for the inconvenience you have encountered. Due to the unique characteristics of your issue, we feel it would be best if this issue is worked one on one hence I would recommend you to send an email to  AzCommunity[at]Microsoft[dot]com along with the link to this Thread.

    Tuesday, September 10, 2019 5:49 AM
    Moderator
  • Hi

    I have exactly the same issue.

    When I try and deploy from VS2019 I get:

    2>The "UserAgentVersion" parameter is not supported by the "ZipDeployTask" task. Verify the parameter exists on the task, and it is a settable public instance property.

    The csproj file contains:

    <Project Sdk="Microsoft.NET.Sdk">

      <PropertyGroup>

        <TargetFramework>netcoreapp2.1</TargetFramework>

        <AzureFunctionsVersion>v2</AzureFunctionsVersion>

      </PropertyGroup>

      <ItemGroup>

        <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.29" />

        <PackageReference Include="System.Data.SqlClient" Version="4.6.1" />

      </ItemGroup>

      <ItemGroup>

        <None Update="host.json">

          <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

        </None>

        <None Update="local.settings.json">

          <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

          <CopyToPublishDirectory>Never</CopyToPublishDirectory>

        </None>

      </ItemGroup>

    </Project>

    Can you help?

    Thanks

    Tony

    Thursday, September 19, 2019 4:29 PM
  • Hello TD_SS,

    Responded to the email you sent.

    • Proposed as answer by TD_SS Monday, September 23, 2019 9:20 AM
    • Unproposed as answer by TD_SS Monday, September 23, 2019 9:20 AM
    Monday, September 23, 2019 8:33 AM
    Moderator
  • Hi Ketan

    I went to try and recreate the problem this morning  after a weekend away for you – and incredibly it all works.  Both zip deploy and web deploy work fine, I can configure the deployed function and all is as it should be.

    I can only assume some fix applied over the weekend to the platform has done the trick.

    Thanks very much for reaching out though.

    Regards

    Tony

    • Proposed as answer by TD_SS Monday, September 23, 2019 9:20 AM
    Monday, September 23, 2019 9:20 AM
  • My issue got fixed as well ... by magic. I've tried to publish again this week and it worked.

    Monday, September 23, 2019 3:43 PM
  • I am currently having the same problem. VS 2019 16.3.0

    Can Microsoft please be transparent with their solutions instead of holding it back via mail? This is a public forum.

    Has anybody else found a reliable solution that does not consist of waiting a week?


    chn

    Tuesday, October 1, 2019 11:07 AM
  • Hello zuckerthoben,

    Apologies that you encounter the same issue. Can you try creating a new function app and see if it work ?

    Tuesday, October 1, 2019 11:36 AM
    Moderator
  • Just ran into this one - all I did was close and re-open VS2019 and it published ok.
    Friday, October 11, 2019 10:10 AM
  • Same problem here - no solution yet. No help from MS.
    Monday, October 21, 2019 10:15 AM
  • Hello Andi,

    Apologies that you ran into the same issue. If you are still facing the issue, I can help enabling the one-time free support request in case you don't have the support plan. This could be a transient network issue as well so try changing the network and see if that helps.

    Wednesday, October 23, 2019 5:33 AM
    Moderator
  • Workaround is here on GitHub, though a real solution would be much better:

    https://github.com/Azure/Azure-Functions/issues/1338#issuecomment-544985485

    Wednesday, October 23, 2019 6:22 AM
  • Restarting visual studio worked for me.  sdk 1.0.29
    Tuesday, November 5, 2019 11:35 PM
  • Restarting Visual Studio worked for me as well. Microsoft.NETCore.App version 2.1.0

    sdk 1.0.29

    Tuesday, November 12, 2019 4:13 PM