0
votes

I have a solution with analysis service project and USQL project. I have VS2015 community installed on my machine. The solution builds perfect on my machine. Next I want to configure VSTS CI for my solution. I tried using the hosted agent but that is complaining that it cannot find assemblies as below:

  1. Cannot build obj\x86\Development\Model.asdatabase. Reason: Could not load file or assembly 'Microsoft.AnalysisServices.AppLocal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'

  2. 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.

I believed this could be due to the fact that hosted agent didn't have the utilities/configurations to build analysis service and usql projects.
So I decided to use my machine as a private VSTS agent to build the projects since it has all tools installed and is successfully building the solution from within Visual Studio.
However even after using my machine as the build agent it is showing the same error. I am using VSBuild.

So my question:

a. Why VSBuild doesn't ensure a good build when run on a private machine that can otherwise build a project from the installed VS2015 instance?
The machine environment is already supposed to be setup with all required tools/libraries and configuration hence these should be no problem.

b. If the above is not working then generally how to configure a private agent to handle cases which are not supported by the out of the box hosted agent?

c. Any advice on way to fix these errors when using VSBuild?

Any help would be appreciated!

2

2 Answers

0
votes

Please trouble shooting the issue with below steps:

  1. Build your project in VS 2015 on your local machine to make sure it can build successfully.
  2. Make sure you are using the private agent configured on the machine for VSTS build. You can double check by reviewing the build log, and check the local path is where you configured your private agent.
  3. In Visual Studio Build task, please make sure you are using the visual studio version is VS 2015.

enter image description here

0
votes

I'm sorry that currently the usqlproj can only be built within the VisualStudio environment. Standalone MSBuild is not yet supported.

Before we have a workable solution in the future, the only option here is to use the U-SQL SDK to build the U-SQL script directly.

https://docs.microsoft.com/en-us/azure/data-lake-analytics/data-lake-analytics-u-sql-sdk

Thanks a lot, Yu Dong