<commit_before>properties {
    $root =                 $psake.build_script_dir
    $solution_file =        "$root/Mindscape.Raygun4Net.sln"
    $configuration =        "Debug"
    $build_dir =            "$root\build\"
    $release_dir =          "$root\release\"
    $nunit_dir =            "$root\packages\NUnit.Runners.2.6.2\tools\"
    $tools_dir =            "$root\tools"
    $env:Path +=            ";$nunit_dir;$tools_dir"
    $assemblies_to_merge =  "Mindscape.Raygun4Net.dll", `
                            "Newtonsoft.Json.dll"
    $merged_assemlby_name = "Mindscape.Raygun4Net.dll"
}

task default -depends Merge

task Clean {
    remove-item -force -recurse $build_dir -ErrorAction SilentlyContinue | Out-Null
    remove-item -force -recurse $release_dir -ErrorAction SilentlyContinue | Out-Null
}

task Init -depends Clean {
    new-item $release_dir -itemType directory | Out-Null
    new-item $build_dir -itemType directory | Out-Null
}

task Compile -depends Init {
    exec { msbuild "$solution_file" /m /p:OutDir=$build_dir /p:Configuration=$configuration }
}

task Test -depends Compile {
    $test_assemblies = Get-ChildItem $build_dir -Include *Tests.dll -Name

    Push-Location -Path $build_dir

    exec { nunit-console.exe $test_assemblies }

    Pop-Location
}

task Merge -depends Compile {
    Push-Location -Path $build_dir

    exec { ilmerge.exe /internalize /out:"$release_dir\$merged_assemlby_name" $assemblies_to_merge }

    Pop-Location
}<commit_msg>Make the build work on Window 7 machines.<commit_after>properties {
    $root =                 $psake.build_script_dir
    $raygun_project =       "$root/Mindscape.Raygun4Net/Mindscape.Raygun4Net.csproj"
    $rayguntests_project =  "$root/Mindscape.Raygun4Net.Tests/Mindscape.Raygun4Net.Tests.csproj"
    $raygunwinrt_project =  "$root/Mindscape.Raygun4Net.WinRT/Mindscape.Raygun4Net.WinRT.csproj"
    $configuration =        "Debug"
    $build_dir =            "$root\build\"
    $release_dir =          "$root\release\"
    $nunit_dir =            "$root\packages\NUnit.Runners.2.6.2\tools\"
    $tools_dir =            "$root\tools"
    $env:Path +=            ";$nunit_dir;$tools_dir"
    $assemblies_to_merge =  "Mindscape.Raygun4Net.dll", `
                            "Newtonsoft.Json.dll"
    $merged_assemlby_name = "Mindscape.Raygun4Net.dll"
    $windowsversion =       (Get-WmiObject Win32_OperatingSystem).Version
}

task default -depends Merge

task Clean {
    remove-item -force -recurse $build_dir -ErrorAction SilentlyContinue | Out-Null
    remove-item -force -recurse $release_dir -ErrorAction SilentlyContinue | Out-Null
}

task Init -depends Clean {
    new-item $release_dir -itemType directory | Out-Null
    new-item $build_dir -itemType directory | Out-Null
}

task Compile -depends Init {

    exec { msbuild "$raygun_project" /m /p:OutDir=$build_dir /p:Configuration=$configuration }
    exec { msbuild "$rayguntests_project" /m /p:OutDir=$build_dir /p:Configuration=$configuration }
    
    if($windowsversion -ge 6.2) { #if we're using Windows 8 or better
        echo "building winrt version for $windowsversion"
        exec { msbuild "$raygunwinrt_project" /m /p:OutDir=$build_dir /p:Configuration=$configuration }
    }
}

task Test -depends Compile {
    $test_assemblies = Get-ChildItem $build_dir -Include *Tests.dll -Name

    Push-Location -Path $build_dir

    exec { nunit-console.exe $test_assemblies }

    Pop-Location
}

task Merge -depends Compile {
    Push-Location -Path $build_dir

    exec { ilmerge.exe /internalize /out:"$release_dir\$merged_assemlby_name" $assemblies_to_merge }

    Pop-Location
}
{'fraction_non_alphanumeric': 0.11233177698434496, 'fraction_numerical': 0.006316945893985169, 'mean_word_length': 2.88272921108742, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6284638', 'n_tokens_mistral': 1259, 'n_tokens_neox': 1207, 'n_words': 234}