<commit_before><?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <!-- This .targets file exposes target to restore NuGet packages based on all package configuration files located in repositories.config file. -->
  <!-- NuGet works fine in VS but on most build servers the building is done through command line, and if build is done from clean repository, the NuGet packages need to be restored. -->
  
  <!-- Import the DownloadFile task -->
  <Import Project="$(MSBuildThisFileDirectory)DownloadFile.targets" />
  
  <!-- Task to generate package.config files and NuGet restore command line arguments -->
  <UsingTask
    Condition="Exists('$(MSBuildThisFileDirectory)CommonBuildTools.dll')"
    TaskName="CommonBuildTools.CreateNuGetPackagesFilesTask"
    AssemblyFile="$(MSBuildThisFileDirectory)CommonBuildTools.dll"
    />
  <UsingTask
    Condition="!Exists('$(MSBuildThisFileDirectory)CommonBuildTools.dll')"
    TaskName="CommonBuildTools.CreateNuGetPackagesFilesTask"
    AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll"
    TaskFactory="CodeTaskFactory">
    <ParameterGroup>
      <NuGetManagementFile ParameterType="System.String" Required="False" />
      <NuGetManagementContents ParameterType="System.String" Required="False" />
      <NuGetPackagesFiles ParameterType="Microsoft.Build.Framework.ITaskItem[]" Output="True" />
    </ParameterGroup>
    <Task>
      <Reference Include="System.Core" />
      <Code Source="$(MSBuildThisFileDirectory)../Source/CommonBuildTools/CreateNuGetPackagesFilesTask.cs" />
    </Task>
  </UsingTask>

  <Target Name="RestoreNuGetPackages">
    <!-- Generate NuGet package files (use ErrorAndContinue in order to delete generated files) -->
    <CommonBuildTools.CreateNuGetPackagesFilesTask
      NuGetManagementFile="$(NuGetManagementFile)"
      NuGetManagementContents="$(NuGetManagementContents)"
      >
      <Output TaskParameter="NuGetPackagesConfigFiles" ItemName="NuGetPackagesConfigFiles" />
    </CommonBuildTools.CreateNuGetPackagesFilesTask>
    
    <!-- For each package file, run NuGet -->
    <Message 
      Condition=" '$(NuGetRestore_NuGetExe)' == '' "
      Text="A path to NuGet executable was not specified, using $(MSBuildThisFileDirectory)NuGet.exe."
      />
    <PropertyGroup Condition=" '$(NuGetRestore_NuGetExe)' == '' ">
      <NuGetRestore_NuGetExe>$(MSBuildThisFileDirectory)NuGet.exe</NuGetRestore_NuGetExe>
    </PropertyGroup>
    
    <!-- Download NuGet executable, if needed -->
    <Message
      Condition="!Exists($(NuGetRestore_NuGetExe))"
      Text="NuGet executable $(NuGetRestore_NuGetExe) does not exist, downloading from https://www.nuget.org/nuget.exe."
      />
    <CommonBuildTools.DownloadFileTask
      Condition="!Exists($(NuGetRestore_NuGetExe))"
      URI="https://www.nuget.org/nuget.exe"
      FilePath="$(NuGetRestore_NuGetExe)"
      ContinueOnError="ErrorAndContinue"
      />
    
    <!-- Run NuGet for all package files -->
    <Exec
      Command="&quot;$(NuGetRestore_NuGetExe)&quot; restore %(NuGetPackagesConfigFiles->NuGetParameters)"
      />
    
    <!-- Delete generated packages.config files -->
    <Delete
      Files="@(NuGetPackagesConfigFiles)"
      ContinueOnError="WarnAndContinue"
      />
  </Target>
</Project><commit_msg>Small fix to NuGet restore task.<commit_after><?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <!-- This .targets file exposes target to restore NuGet packages based on all package configuration files located in repositories.config file. -->
  <!-- NuGet works fine in VS but on most build servers the building is done through command line, and if build is done from clean repository, the NuGet packages need to be restored. -->
  
  <!-- Import the DownloadFile task -->
  <Import Project="$(MSBuildThisFileDirectory)DownloadFile.targets" />
  
  <!-- Task to generate package.config files and NuGet restore command line arguments -->
  <UsingTask
    Condition="Exists('$(MSBuildThisFileDirectory)CommonBuildTools.dll')"
    TaskName="CommonBuildTools.CreateNuGetPackagesFilesTask"
    AssemblyFile="$(MSBuildThisFileDirectory)CommonBuildTools.dll"
    />
  <UsingTask
    Condition="!Exists('$(MSBuildThisFileDirectory)CommonBuildTools.dll')"
    TaskName="CommonBuildTools.CreateNuGetPackagesFilesTask"
    AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll"
    TaskFactory="CodeTaskFactory">
    <ParameterGroup>
      <NuGetManagementFile ParameterType="System.String" Required="False" />
      <NuGetManagementContents ParameterType="System.String" Required="False" />
      <NuGetPackagesFiles ParameterType="Microsoft.Build.Framework.ITaskItem[]" Output="True" />
    </ParameterGroup>
    <Task>
      <Reference Include="System.Core" />
      <Code Source="$(MSBuildThisFileDirectory)../Source/CommonBuildTools/CreateNuGetPackagesFilesTask.cs" />
    </Task>
  </UsingTask>

  <Target Name="RestoreNuGetPackages">
    <!-- Generate NuGet package files (use ErrorAndContinue in order to delete generated files) -->
    <CommonBuildTools.CreateNuGetPackagesFilesTask
      NuGetManagementFile="$(NuGetManagementFile)"
      NuGetManagementContents="$(NuGetManagementContents)"
      >
      <Output TaskParameter="NuGetPackagesConfigFiles" ItemName="NuGetPackagesConfigFiles" />
    </CommonBuildTools.CreateNuGetPackagesFilesTask>
    
    <!-- For each package file, run NuGet -->
    <Message 
      Condition=" '$(NuGetRestore_NuGetExe)' == '' "
      Text="A path to NuGet executable was not specified, using $(MSBuildThisFileDirectory)NuGet.exe."
      />
    <PropertyGroup Condition=" '$(NuGetRestore_NuGetExe)' == '' ">
      <NuGetRestore_NuGetExe>$(MSBuildThisFileDirectory)NuGet.exe</NuGetRestore_NuGetExe>
    </PropertyGroup>
    
    <!-- Download NuGet executable, if needed -->
    <Message
      Condition="!Exists($(NuGetRestore_NuGetExe))"
      Text="NuGet executable $(NuGetRestore_NuGetExe) does not exist, downloading from https://www.nuget.org/nuget.exe."
      />
    <CommonBuildTools.DownloadFileTask
      Condition="!Exists($(NuGetRestore_NuGetExe))"
      URI="https://www.nuget.org/nuget.exe"
      FilePath="$(NuGetRestore_NuGetExe)"
      />
    
    <!-- Run NuGet for all package files -->
    <Exec
      Command="&quot;$(NuGetRestore_NuGetExe)&quot; restore %(NuGetPackagesConfigFiles->NuGetParameters)"
      />
    
    <!-- Delete generated packages.config files -->
    <Delete
      Files="@(NuGetPackagesConfigFiles)"
      ContinueOnError="WarnAndContinue"
      />
  </Target>
</Project>
{'fraction_non_alphanumeric': 0.12262902514336127, 'fraction_numerical': 0.002646669607410675, 'mean_word_length': 3.746685275645499, 'pattern_counts': {'":': 0, '<': 81, '<?xml version=': 2, '>': 83, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1675801', 'n_tokens_mistral': 2106, 'n_tokens_neox': 1861, 'n_words': 373}