Error when running locally: Microsoft.Analytics.LocalRun.dll' because it is being used by another process.


  • I just downloaded ADLS analytics and can't run locally due to this issue.  The handle is held upon running by LocalRunHelper.exe and causes the error above when attempting to run.  

    Full Error:

    Unexpected Exception 'System.IO.IOException: The process cannot access the file 'D:\src\bin\Debug\6F9EFFC3B3CC44FD\Microsoft.Analytics.LocalRun.dll' because it is being used by another process.
    Server stack trace:
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
       at ScopeCompiler.Parser.CopyFileIfDifferent(String sourceDirPath, String sourceFileName, String destDirPath, String destFileName)
       at Microsoft.Analytics.LocalRun.LocalParseSandboxer.CloneLocalRuntimeFiles(Configuration config, Settings settings)
       at Microsoft.Analytics.LocalRun.LocalParseSandboxer.PrivateParse(String script, Settings settings)
       at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
       at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.Analytics.LocalRun.LocalParseSandboxer.PrivateParse(String script, Settings settings)
       at Microsoft.Analytics.LocalRun.LocalParseSandboxer.CompileInSeparateAppDomain(String[] scripts, Settings settings, Configuration configuration)
       at ScopeCompiler.Parser.FullParse(String[] scripts, String filePath, CompilerEnvironment environment, Settings settings, Func`4 funcParse, String nebulaCommandLine)
       at Microsoft.Analytics.LocalRun.LocalParseSandboxer.FullParseInSeparateAppDomain(String script, String filePath, Settings settings, Configuration configuration)
       at Microsoft.Analytics.LocalRun.LocalCompiler.Compile(String script, String filePath, Boolean shallow, CommonCompileResult& result)
       at Microsoft.Analytics.LocalRun.LocalRunCompileService.Compile(CompileParameter parm)'

    Sunday, December 3, 2017 5:02 AM

All replies

  • Sorry for the inconvenience and thanks for the reporting. I am forwarding the error to our developers and will reply the thread once I get feedback from them.



    Tuesday, December 5, 2017 12:01 PM
  • Hi,

    This looks like that the target file was in use by a running process, possibly from still running local instances of previous local run task. Could you please try to start Task Manager, kill all "LocalRunHelp.exe", then in VS, try to build clean and start local run again ?


    Yu Dong

    Wednesday, December 6, 2017 2:07 AM