-1

I am working with continous integration with vsts using MSBuild for U-SQL reffering the link : https://blogs.msdn.microsoft.com/azuredatalake/2017/10/24/continuous-integration-made-easy-with-msbuild-support-for-u-sql-preview/

But i am facing below issue while working with VSTS Build server

ValidateSolutionConfiguration: Building solution configuration "Debug|Any CPU". ADLAUSQL1\ADLAUSQL1.usqlproj(0,0): Error MSB4057: The target "Build" does not exist in the project. Project "D:\a\1\s\ADLAUSQL1.sln" (1) is building "D:\a\1\s\ADLAUSQL1\ADLAUSQL1.usqlproj" (2) on node 1 (default targets). D:\a\1\s\ADLAUSQL1\ADLAUSQL1.usqlproj : error MSB4057: The target "Build" does not exist in the project. Done Building Project "D:\a\1\s\ADLAUSQL1\ADLAUSQL1.usqlproj" (default targets) -- FAILED. Done Building Project "D:\a\1\s\ADLAUSQL1.sln" (default targets) -- FAILED. Build FAILED. "D:\a\1\s\ADLAUSQL1.sln" (default target) (1) -> "D:\a\1\s\ADLAUSQL1\ADLAUSQL1.usqlproj" (default target) (2) -> D:\a\1\s\ADLAUSQL1\ADLAUSQL1.usqlproj : error MSB4057: The target "Build" does not exist in the project. 0 Warning(s) 1 Error(s)

My build arguments is - /p:USQLSDKPath=$(Build.SourcesDirectory)/USQLMSBuild/packages/Microsoft.Azure.DataLake.USQL.SDK.1.3.180223/build/runtime /p:USQLTargetType=SyntaxCheck /p:DataRoot=$(Build.SourcesDirectory)

Any help will be much appreciated. Pls let me know if you need any further information.

Arun S
  • 3
  • 3
  • Followed this link - https://stackoverflow.com/questions/46950853/error-msb4057-the-target-build-does-not-exist-in-the-project-working-with-con/49535436#49535436. But not able to find reasons for this error. – Arun S Mar 29 '18 at 05:55

1 Answers1

0

To troubleshoot this issue, please check the following aspects:

  1. The usql project can build with msbuild successful First, you should make sure your project can build successful in your local machine. Then build in VSTS.

  2. Check the MSBuild arguments

    Assume the project structure in your repo as below:

    root repo
        |___ADLAUSQL1.sln
        |___ADLAUSQL1
               |___ADLAUSQL1.usqlproj
               |___...
    

    Then you should specify the USQLSDKPath as $(Build.SourcesDirectory)/ADLAUSQL1/packages/Microsoft.Azure.DataLake.USQL.SDK.1.3.180223/build/runtime.

    Note: the Microsoft.Azure.DataLake.USQL.SDK.1.3.180223 means you install the version 1.3.180223 of the package Microsoft.Azure.DataLake.USQL.SDK in your project.

  3. Choose the VS version for the project correctly

    And make sure you used the right VS version to build. Since you are using hosted agent, please select Hosted agent or Hosted VS2017 agent based on your requirement:

    • If you want to build your project with VS2015, you should select Hosted agent.
    • If you want to build your project with VS2017, you should use Hosted VS2017 agent instead.

enter image description here

bahrep
  • 29,961
  • 12
  • 103
  • 150
Marina Liu
  • 36,876
  • 5
  • 61
  • 74
  • followed the steps in your message but I'm facing the below issue - ADLAUSQL1\ADLAUSQL1.usqlproj(34,3): Error MSB4019: The imported project "C:\Users\buildguest\AppData\Roaming\Microsoft\DataLake\MsBuild\1.0\Usql.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk I'm following the same process followed for Azure Data factory. But I'm getting the above error here. – Arun S Mar 29 '18 at 09:44
  • This is my import commands from my project file – Arun S Mar 29 '18 at 09:46
  • So you imported files located locally? That's becaused you are using Hosted agent which can not get your local files. Two options for the issue. Option1: setup a private agent in your local machine, and queue the build with the private agent. Option2: add the imported files in the same repo, and import with the new path. – Marina Liu Mar 30 '18 at 08:50
  • thanks for the info..i have set up a private agent now and getting this issue - 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. – Arun S Mar 30 '18 at 10:38
  • @ArunS Since your initial problem you asked has been solved, you can mark the answer (√ symbol on the left of the answer). And it will also benefit others who have similar questions. And for your additional question, please refer the post https://stackoverflow.com/questions/49574154/azure-data-lake-analytics-ci-cd. – Marina Liu Apr 02 '18 at 05:41