Local execution of USQL scripts


  • I just downloaded the Azure Data Lake Tools for Visual Studio and opened the sample USQL project.  I get compiler errors when I try to build the sample scripts.

    Is local build and execution supported yet?

    Wednesday, November 25, 2015 4:38 PM


All replies

  • Yes, an *Initial* version of local execution is now available with the latest version of Azure Data Lake tools for Visual Studio.

    Could you share the compiler error you are getting?

    Thursday, November 26, 2015 3:51 PM
  • They are all similar to this.  I am using Data Lake Tools for VS 2015 version 2.0.3000.0.


    E_CSC_USER_ROSLYNENVIRONMENT: Error when creating C# environment for the script: The type or namespace name 'IExtractor' could not be found (are you missing a using directive or an assembly reference?)Description:C# reported this problem in the C# environment for the script.Resolution:The C# environment consists of referenced assemblies, used namespaces and C# blocks. Make sure that together they form a valid C# program.

    Tuesday, December 1, 2015 10:47 PM
  • Are you using an existing sample project ?   To support local run feature, we added some extra properties to the project file and it is not backward compatible.  Could you please try to create a new U-SQL project and import the test scripts into the new project and have a try ?

    Wednesday, December 2, 2015 5:58 AM
  • I tried both using the sample project template and the empty project template.  Same errors.
    Thursday, December 3, 2015 1:46 AM
  • That interface should be defined in

    C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Microsoft Azure Data Lake Tools for Visual Studio 2015\2.0.3000.0\LocalRunSDK\Microsoft.Analytics.Interfaces.dll

    And in this preview release, that file should be version (size 13824 bytes with modified date Nov 12, 2015 8:46PM)

    Could you please confirm this ?

    Thanks a lot !

    Friday, December 4, 2015 2:09 AM
  • Yes, that file exists and is the correct version.

    One observation.  When I create a new project from either template, there are no assemblies referenced.  Should there be?

    Friday, December 4, 2015 1:29 PM
  • I'm sorry for the late response.  

    The U-SQL Project won't refer to these system default assemblies. The Class Library (For U-SQL Application) project type will include the system default assemblies.

    BTW,  I forgot to mention, could you please also look at the following to see if there has the mentioned assembly ?

    C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PublicAssemblies

    Thanks a lot

    Thursday, December 10, 2015 6:26 AM
  • Yes, the Microsoft.Analytics.Interfaces assembly is also in the PublicAssemblies folder.
    Friday, December 11, 2015 1:44 AM
  • Jeff,  could you please try to open a command prompt,  change to where your test script is located, run the following command to try to compile the script and let me know the outputs on screen ?  Thanks a lot for the help.

    "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Microsoft Azure Data Lake Tools for Visual Studio 2015\2.0.3000.0\LocalRunSDK\LocalRunHelper.exe" compile -CppSDK "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Microsoft Azure Data Lake Tools for Visual Studio 2015\2.0.3000.0\CppSDK" -DataRoot Full_path_to_an_existing_temp_directory -Script your_script.usql

    Friday, December 11, 2015 4:42 AM
  • I was able to resolve the problem.  

    I am running Visual Studio in a Windows VM on a Mac.  The default project location is a UNC path to the Documents folder on the host OS.  When I create a project in a local path on the VM, building and running a script locally works fine.

    It seems like there is a problem with the local runtime resolving assemblies when the project is on a UNC path and the assemblies are installed on a local path.

    Maybe the product team can look into adding support for this.

    Saturday, December 12, 2015 3:56 PM
  • Jeff,

    Thanks for the update.  Yes, working folders (projects and data) with UNC paths are not supported at this moment.

    Monday, December 14, 2015 3:00 AM