// output sink is for testing
        internal MsBuildFileSetFactory(
            DotNetWatchOptions dotNetWatchOptions,
            string muxerPath,
            IReporter reporter,
            string projectFile,
            OutputSink outputSink,
            bool waitOnError,
            bool trace)
        {
            Ensure.NotNull(reporter, nameof(reporter));
            Ensure.NotNullOrEmpty(projectFile, nameof(projectFile));
            Ensure.NotNull(outputSink, nameof(outputSink));

            _muxerPath          = muxerPath;
            _reporter           = reporter;
            _dotNetWatchOptions = dotNetWatchOptions;
            _projectFile        = projectFile;
            _outputSink         = outputSink;
            _processRunner      = new ProcessRunner(reporter);
            _buildFlags         = InitializeArgs(FindTargetsFile(), trace);

            _waitOnError = waitOnError;
        }