Azure Data lake analytics CI/CD

2019-02-28 19:08发布

问题:

I'm trying to build CI/CD for Azure Data lake analytics - USQL code and when i build the code using Visual studio build option in VSTS getting the below error - Using the Private agent for taking the build -

C:\Users\a.sivananthan\AppData\Roaming\Microsoft\DataLake\MsBuild\1.0\Usql.targets(33,5): Error MSB4062: The "Microsoft.Cosmos.ScopeStudio.VsExtension.CompilerTask.USqlCompilerTask" task could not be loaded from the assembly Microsoft.Cosmos.ScopeStudio.VsExtension.CompilerTask. Could not load file or assembly 'Microsoft.Cosmos.ScopeStudio.VsExtension.CompilerTask' or one of its dependencies. The system cannot find the file specified. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

Any help in this regard would be great.

回答1:

Two things for your build definition:

1.Use Nuget restore task before VS Build task

Since you are using Microsoft.Azure.DataLake.USQL.SDK nuget package for your usql project, you should download the package to the agent build directory before building.

Detail configuration for NuGet restore task as below (assume download the package into $(Build.SourcesDirectory)\ADLAUSQL1\packages):

2.Use correct msbuild arguments

Since you specifies the Microsoft.Azure.DataLake.USQL.SDK package with version 1.3.180223, you should specify the package location and version correspondingly like:

/p:USQLSDKPath=$(Build.SourcesDirectory)/ADLAUSQL1/packages/Microsoft.Azure.DataLake.USQL.SDK.1.3.180223/build/runtime /p:USQLTargetType=SyntaxCheck /p:DataRoot=$(Build.SourcesDirectory)



回答2:

Try creating a new project and follow the steps in the earlier conversations. It should be successful.