Bari.Plugins.VsCore.Tools.MSBuild.Run C# (CSharp) Method

Run() public method

Runs MSBuild
public Run ( IFileSystemDirectory root, string relativePath ) : void
root IFileSystemDirectory The root directory which will became MSBuild's root directory
relativePath string Relative path of the solution file (or MSBuild file) to be processed
return void
        public void Run(IFileSystemDirectory root, string relativePath)
        {
            var localRoot = root as LocalFileSystemDirectory;
            if (localRoot != null)
            {
                var absPath = Path.Combine(localRoot.AbsolutePath, relativePath);
                if (!Run(root, (Path.GetFileName(absPath) ?? String.Empty), "/m", "/nologo", "/verbosity:" + Verbosity, "/consoleloggerparameters:" + ConsoleLoggerParameters))
                    throw new MSBuildFailedException();
            }
            else
            {
                throw new NotSupportedException("Only local file system is supported for MSBuild!");
            }
        }