locked
VSO Build definition not working for data factory project RRS feed

  • Question

  • Hello,

    I have created build definition in vso for my data factory project. I am using on-premise agent to build but it gives following error :

    C:\Users\AppData\Roaming\Microsoft\DataFactory Tools for Visual Studio\MsBuild\1.0\DataFactory.targets (35, 5)                  
    The "ADFCompilerTask" task failed unexpectedly.
    System.AggregateException: One or more errors occurred. ---> System.ArgumentNullException: Value cannot be null.
    Parameter name: source
       at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)

    Please help.

    Monday, May 16, 2016 10:18 AM

Answers

  • This is the same error I got when trying to set up an automated deployment/build using MSBuild on TeamCity with .dfproj files.  After talking to support, there is seemingly no support for automated deploys of .dfproj files directly.

    Instead, you'll have to write some Powershell scripts that determine which .json files are linked services, tables, and pipelines, then use the DataFactory cmdlets to upload them each in turn, and in that order.

    • Marked as answer by Jeet T Tuesday, May 17, 2016 11:34 AM
    Monday, May 16, 2016 1:58 PM

All replies

  • This is the same error I got when trying to set up an automated deployment/build using MSBuild on TeamCity with .dfproj files.  After talking to support, there is seemingly no support for automated deploys of .dfproj files directly.

    Instead, you'll have to write some Powershell scripts that determine which .json files are linked services, tables, and pipelines, then use the DataFactory cmdlets to upload them each in turn, and in that order.

    • Marked as answer by Jeet T Tuesday, May 17, 2016 11:34 AM
    Monday, May 16, 2016 1:58 PM
  • hi Jeet..

    im building my CI/CD for my ADF codes using powershell script. But in my powershell script how will i refer the adf files..when i run the powershell locally from my laptop it gets deployed into my subscription..but i need to do the same using VSTS and which path i need to refer..

    foreach($file in Get-ChildItem "C:\Users\a.sivananthan\Documents\Visual Studio 2015\Projects\ADFAutomation2018\ADFAutomation2018\" -filter "*LinkedService*")
    {
      New-AzureRmDataFactoryLinkedService -ResourceGroupName "myresource1" -DataFactoryName "ADFAutomationjan2018" -Name $file.BaseName -File $file.FullName -Force | Format-List
    }

    Appreciate any help in this regard

    Thursday, February 22, 2018 10:14 AM