USQL SDK - Unit Test - VS2017 - Necessary runtime files are not getting copied to working directory


  • Using VS2017


    Unit Test project was created. I added the SDK package and a reference to LocalRunHelper.exe. 

    When running USQL locally with the "DoRun" command. I get the following error: System.ArgumentException: 'RuntimePath'

    If I manually copy all of the files in the runtime folder in the NuGet package to my working directory the code works. It seems like the code is missing a reference to ScopeEngine.dll but I am unable to add that as a reference to my project. 

    Monday, August 20, 2018 6:57 PM

All replies



    This is by design.  Instead of copying all the files to the target folder by adding references, it's better to set  the "RuntimeDir" to where the runtime files located.   Actually, although it is possible to call the APIs of LocalRunHelper,  I suggest that you call the command line of localrunhelper.exe instead by using "System.Diagnostics.Process" and check the process exit value to determine if the test is successful or not.    Or you will need to also copy some of the directly referenced assemblies of LocalRunHelper class to make it work.

    Alternatively, you could try to use a new type of projects to do UT of your scripts:


    Yu Dong

    Wednesday, August 22, 2018 2:24 AM