<commit_before>﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text.RegularExpressions;
using OmniSharp.Common;
using OmniSharp.Solution;

namespace OmniSharp.Build
{
    public class BuildHandler
    {
        private readonly ISolution _solution;
        private readonly BuildResponse _response;
        private readonly List<QuickFix> _quickFixes;

        public BuildHandler(ISolution solution)
        {
            _solution = solution;
            _response = new BuildResponse();
            _quickFixes = new List<QuickFix>();
        }

		private static bool IsUnix
		{
			get
			{
				var p = (int)Environment.OSVersion.Platform;
				return (p == 4) || (p == 6) || (p == 128);
			}
		}

        public BuildResponse Build()
        {
			var build = IsUnix
						? "xbuild" 
						: @"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Msbuild.exe";

            var startInfo = new ProcessStartInfo
                {
                    FileName = build,
                    Arguments = "/m /nologo /property:GenerateFullPaths=true " + _solution.FileName,
                    RedirectStandardOutput = true,
                    RedirectStandardError = true,
                    RedirectStandardInput = true,
                    UseShellExecute = false,
                    CreateNoWindow = true
                };

            var process = new Process
                {
                    StartInfo = startInfo,
                    EnableRaisingEvents = true<commit_msg>xbuild doesn't support /m parameter<commit_after>﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text.RegularExpressions;
using OmniSharp.Common;
using OmniSharp.Solution;

namespace OmniSharp.Build
{
    public class BuildHandler
    {
        private readonly ISolution _solution;
        private readonly BuildResponse _response;
        private readonly List<QuickFix> _quickFixes;

        public BuildHandler(ISolution solution)
        {
            _solution = solution;
            _response = new BuildResponse();
            _quickFixes = new List<QuickFix>();
        }

		private static bool IsUnix
		{
			get
			{
				var p = (int)Environment.OSVersion.Platform;
				return (p == 4) || (p == 6) || (p == 128);
			}
		}

        public BuildResponse Build()
        {
			var build = IsUnix
						? "xbuild" 
						: @"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Msbuild.exe";

            var startInfo = new ProcessStartInfo
                {
                    FileName = build,
                    Arguments = IsUnix ? "" : "/m " + "/nologo /property:GenerateFullPaths=true " + _solution.FileName,
                    RedirectStandardOutput = true,
                    RedirectStandardError = true,
                    RedirectStandardInput = true,
                    UseShellExecute = false,
                    CreateNoWindow = true
                };

            var process = new Process
                {
                    StartInfo = startInfo,
                    EnableRaisingEvents = true
{'fraction_non_alphanumeric': 0.08141420694129095, 'fraction_numerical': 0.009082062925721699, 'mean_word_length': 1.7437722419928825, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2951756', 'n_tokens_mistral': 901, 'n_tokens_neox': 761, 'n_words': 188}