private static IDotNetCliService CreateDotNetCliService(DotNetCliVersion dotNetCliVersion, ILoggerFactory loggerFactory, IEventEmitter eventEmitter) { var dotnetPath = Path.Combine( TestAssets.Instance.RootFolder, dotNetCliVersion.GetFolderName(), "dotnet"); if (!File.Exists(dotnetPath)) { dotnetPath = Path.ChangeExtension(dotnetPath, ".exe"); } if (!File.Exists(dotnetPath)) { throw new InvalidOperationException($"Local .NET CLI path does not exist. Did you run build.(ps1|sh) from the command line?"); } return(new DotNetCliService(loggerFactory, NullEventEmitter.Instance, dotnetPath)); }
private static IDotNetCliService CreateDotNetCliService( DotNetCliVersion dotNetCliVersion, ILoggerFactory loggerFactory, IOmniSharpEnvironment environment, IEventEmitter eventEmitter) { var dotnetPath = Path.Combine( TestAssets.Instance.RootFolder, dotNetCliVersion.GetFolderName()); var options = new DotNetCliOptions { LocationPaths = new[] { dotnetPath } }; if (!Directory.Exists(dotnetPath)) { throw new InvalidOperationException( $"Local .NET CLI path does not exist. Did you run build.(ps1|sh) from the command line?"); } return(new DotNetCliService(loggerFactory, NullEventEmitter.Instance, Options.Create(options), environment)); }