<commit_before><?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" InitialTargets="CheckForBuildTools" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

  <PropertyGroup>
    <IsRuntimeAssembly Condition="'$(IsRuntimeAssembly)'=='' AND '$(IsReferenceAssembly)' != 'true' AND '$(BinPlaceRef)' != 'true' AND '$(IsTestProject)' != 'true'">true</IsRuntimeAssembly>
    <!-- Try to determine if this is a simple library without a ref project.
         https://github.com/dotnet/corefx/issues/14291 is tracking cleaning this up -->
    <IsRuntimeAndReferenceAssembly Condition="'$(IsRuntimeAndReferenceAssembly)' == '' and '$(IsRuntimeAssembly)' == 'true' and Exists('$(SourceDir)/$(AssemblyName)') and !Exists('$(SourceDir)/$(AssemblyName)/ref') and !$(AssemblyName.StartsWith('System.Private'))">true</IsRuntimeAndReferenceAssembly>
    <IsNETCoreAppRef Condition="'$(IsNETCoreAppRef)' == ''">$(IsNETCoreApp)</IsNETCoreAppRef>
    <IsUAPRef Condition="'$(IsUAPRef)' == ''">$(IsUAP)</IsUAPRef>

    <BuildingDesktopFacade Condition="'$(IsDesktopFacade)' == 'true' And ('$(TargetGroup)' == 'netfx' Or $(TargetGroup.StartsWith('net4')))" >true</BuildingDesktopFacade>

    <!-- if building desktop facade, we don't bin place the refs -->
    <BinPlaceRef Condition="'$(BinPlaceRef)' == '' And '$(BuildingDesktopFacade)' != 'true' And ('$(IsReferenceAssembly)' == 'true' OR '$(IsRuntimeAndReferenceAssembly)' == 'true')">true</BinPlaceRef>
    <BinPlaceRuntime Condition="'$(BinPlaceRuntime)' == '' And ('$(IsRuntimeAssembly)' == 'true' OR '$(IsRuntimeAndReferenceAssembly)' == 'true')">true</BinPlaceRuntime>

    <!-- if building desktop facade and bin placing the runtime, then we need to bin place the refs too -->
    <BinPlaceRef Condition="'$(BuildingDesktopFacade)' == 'true' And '$(BinPlaceRuntime)' == 'true'">true</BinPlaceRef>

    <BinPlaceUseHardlinksIfPossible Condition="'$(BinPlaceUseHardlinksIfPossible)' == ''">true</BinPlaceUseHardlinksIfPossible>
  </PropertyGroup>

  <ItemGroup Condition="'@(BinPlaceConfiguration)' == ''">
    <!-- binplace to directories for the target vertical -->
    <BinPlaceConfiguration Include="$(BuildConfiguration)">
      <RefPath>$(BuildConfigurationRefPath)</RefPath>
      <RuntimePath>$(RuntimePath)</RuntimePath>
    </BinPlaceConfiguration>

    <!-- binplace to directories for packages -->
    <BinPlaceConfiguration Condition="'$(IsNETCoreApp)' == 'true' AND '$(BuildingNETCoreAppVertical)' == 'true'" Include="netcoreapp-$(_bc_OSGroup)">
      <PackageFileRefPath Condition="'$(IsNETCoreAppRef)' == 'true'">$(NETCoreAppPackageRefPath)</PackageFileRefPath>
      <PackageFileRuntimePath>$(NETCoreAppPackageRuntimePath)</PackageFileRuntimePath>
    </BinPlaceConfiguration>
    <BinPlaceConfiguration Condition="'$(IsUAP)' == 'true' AND '$(BuildingUAPVertical)' == 'true'" Include="uap-$(_bc_OSGroup)">
      <PackageFileRefPath Condition="'$(IsUAPRef)'=='true'">$(UAPPackageRefPath)</PackageFileRefPath>
      <PackageFileRuntimePath>$(UAPPackageRuntimePath)</PackageFileRuntimePath>
    </BinPlaceConfiguration>
    <BinPlaceConfiguration Condition="'$(IsUAP)' == 'true' AND '$(BuildingUAPAOTVertical)' == 'true'" Include="uapaot-$(_bc_OSGroup)">
      <PackageFileRefPath Condition="'$(IsUAPRef)'=='true'">$(UAPPackageRefPath)</PackageFileRefPath>
      <PackageFileRuntimePath>$(UAPAOTPackageRuntimePath)</PackageFileRuntimePath>
    </BinPlaceConfiguration>

    <!-- Setup the shared framework directory for testing -->
    <BinPlaceConfiguration Condition="'$(BinPlaceTestSharedFramework)' == 'true'" Include="netcoreapp-$(_bc_OSGroup)">
      <RuntimePath>$(NETCoreAppTestSharedFrameworkPath)</RuntimePath>
    </BinPlaceConfiguration>
    <!-- Setup the ILCInputFolder directory for testing uapaot -->
    <BinPlaceConfiguration Condition="'$(BinPlaceILCInputFolder)' == 'true'" Include="uapaot-$(_bc_OSGroup)">
      <RuntimePath>$(ILCFXInputFolder)</RuntimePath>
    </BinPlaceConfiguration>

    <!-- binplace targeting packs which may be different from BuildConfiguration -->
    <BinPlaceConfiguration Include="netstandard">
      <RefPath>$(RefRootPath)netstandard/</RefPath>
    </BinPlaceConfiguration>
    <BinPlaceConfiguration Condition="'$(BuildAllConfigurations)' == 'true'"
                           Include="netcoreapp">
      <RefPath>$(RefRootPath)netcoreapp/</RefPath>
    </BinPlaceConfiguration>
    <BinPlaceConfiguration Condition="'$(BuildAllConfigurations)' == 'true'"
                           Include="uap">
      <RefPath>$(RefRootPath)uap/</RefPath>
    </BinPlaceConfiguration>
    <BinPlaceConfiguration Condition="'$(BuildAllConfigurations)' == 'true'"
                           Include="netfx">
      <RefPath>$(RefRootPath)netfx/</RefPath>
    </BinPlaceConfiguration>
  </ItemGroup>

  <Target Name="BinPlace"
          DependsOnTargets="GetBinPlaceDirs;BinPlaceFiles;BinPlaceProps"
          AfterTargets="CopyFilesToOutputDirectory"
          Condition="'$(BinPlaceRef)' == 'true' OR '$(BinPlaceRuntime)' == 'true'" />
  
  <Target Name="BinPlaceFiles"
          Condition="'@(BinPlaceDir)' != ''"
          DependsOnTargets="GetBinPlaceItems" >

    <Message Importance="low" Text="BinPlaceDir: @(BinPlaceDir)" />

    <Copy SourceFiles="@(BinPlaceItem)"
          DestinationFolder="%(BinPlaceDir.Identity)" 
          SkipUnchangedFiles="true"
          OverwriteReadOnlyFiles="true"
          Retries="$(CopyRetryCount)"
          RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
          UseHardlinksIfPossible="$(BinPlaceUseHardlinksIfPossible)">
      <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
    </Copy>
  </Target>

  <UsingTask TaskName="SaveItems" AssemblyFile="$(CoreFxToolsTaskDir)CoreFx.Tools.dll"/>
  <Target Name="BinPlaceProps"
          Condition="'@(PackageFileDir)' != ''"
          DependsOnTargets="GetBinPlaceItems" >
    <PropertyGroup>
      <_propsFilename>$(TargetName)</_propsFilename>
      <_propsFilename Condition="'$(_propsFilename)' == ''">$(MSBuildProjectName)</_propsFilename>
      <_projectDirLength>$(ProjectDir.Length)</_projectDirLength>
    </PropertyGroup>
    
    <ItemGroup>
      <_itemsToSave Include="@(BinPlaceItem)">
        <!-- intentionally empty: to be set by pkgproj -->
        <TargetPath></TargetPath>
      </_itemsToSave>
      
      <!-- Include source files. -->
      <_itemsToSave Condition="'@(Compile)' != ''" Include="@(Compile->'%(FullPath)')">
        <TargetPath>src</TargetPath>
        <TargetPath Condition="$([System.String]::Copy('%(FullPath)').StartsWith('$(ProjectDir)'))">src/$([System.String]::Copy('%(FullPath)').Substring($(_projectDirLength)).Replace('\', '/'))</TargetPath>
        <IsSourceCodeFile>true</IsSourceCodeFile>
      </_itemsToSave>
    </ItemGroup>
    
    <Message Importance="low" Text="PackageFileDir: @(PackageFileDir)" />

    <SaveItems ItemName="FileToPackage"
               Items="@(_itemsToSave)"
               Files="@(PackageFileDir->'%(Identity)\$(_propsFilename).props')" />
  </Target>

  <Target Name="GetBinPlaceItems" DependsOnTargets="GetCopyToOutputDirectoryItems">
    <ItemGroup>
      <BinPlaceItem Condition="Exists('$(TargetPath)')" Include="$(TargetPath)" />
      <BinPlaceItem Condition="Exists('$(TargetDir)$(TargetName).pdb')" Include="$(TargetDir)$(TargetName).pdb" />
      <BinPlaceItem Condition="'$(BinPlaceReferenceCopyLocalPaths)' != 'false'" Include="@(ReferenceCopyLocalPaths)" /><commit_msg>Add option for bin placing the corefx libraries that are part NETCoreApp<commit_after><?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" InitialTargets="CheckForBuildTools" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

  <PropertyGroup>
    <IsRuntimeAssembly Condition="'$(IsRuntimeAssembly)'=='' AND '$(IsReferenceAssembly)' != 'true' AND '$(BinPlaceRef)' != 'true' AND '$(IsTestProject)' != 'true'">true</IsRuntimeAssembly>
    <!-- Try to determine if this is a simple library without a ref project.
         https://github.com/dotnet/corefx/issues/14291 is tracking cleaning this up -->
    <IsRuntimeAndReferenceAssembly Condition="'$(IsRuntimeAndReferenceAssembly)' == '' and '$(IsRuntimeAssembly)' == 'true' and Exists('$(SourceDir)/$(AssemblyName)') and !Exists('$(SourceDir)/$(AssemblyName)/ref') and !$(AssemblyName.StartsWith('System.Private'))">true</IsRuntimeAndReferenceAssembly>
    <IsNETCoreAppRef Condition="'$(IsNETCoreAppRef)' == ''">$(IsNETCoreApp)</IsNETCoreAppRef>
    <IsUAPRef Condition="'$(IsUAPRef)' == ''">$(IsUAP)</IsUAPRef>

    <BuildingDesktopFacade Condition="'$(IsDesktopFacade)' == 'true' And ('$(TargetGroup)' == 'netfx' Or $(TargetGroup.StartsWith('net4')))" >true</BuildingDesktopFacade>

    <!-- if building desktop facade, we don't bin place the refs -->
    <BinPlaceRef Condition="'$(BinPlaceRef)' == '' And '$(BuildingDesktopFacade)' != 'true' And ('$(IsReferenceAssembly)' == 'true' OR '$(IsRuntimeAndReferenceAssembly)' == 'true')">true</BinPlaceRef>
    <BinPlaceRuntime Condition="'$(BinPlaceRuntime)' == '' And ('$(IsRuntimeAssembly)' == 'true' OR '$(IsRuntimeAndReferenceAssembly)' == 'true')">true</BinPlaceRuntime>

    <!-- if building desktop facade and bin placing the runtime, then we need to bin place the refs too -->
    <BinPlaceRef Condition="'$(BuildingDesktopFacade)' == 'true' And '$(BinPlaceRuntime)' == 'true'">true</BinPlaceRef>

    <BinPlaceUseHardlinksIfPossible Condition="'$(BinPlaceUseHardlinksIfPossible)' == ''">true</BinPlaceUseHardlinksIfPossible>
  </PropertyGroup>

  <ItemGroup Condition="'@(BinPlaceConfiguration)' == ''">
    <!-- binplace to directories for the target vertical -->
    <BinPlaceConfiguration Include="$(BuildConfiguration)">
      <RefPath>$(BuildConfigurationRefPath)</RefPath>
      <RuntimePath>$(RuntimePath)</RuntimePath>
    </BinPlaceConfiguration>

    <!-- binplace to directories for packages -->
    <BinPlaceConfiguration Condition="'$(IsNETCoreApp)' == 'true' AND '$(BuildingNETCoreAppVertical)' == 'true'" Include="netcoreapp-$(_bc_OSGroup)">
      <PackageFileRefPath Condition="'$(IsNETCoreAppRef)' == 'true'">$(NETCoreAppPackageRefPath)</PackageFileRefPath>
      <PackageFileRuntimePath>$(NETCoreAppPackageRuntimePath)</PackageFileRuntimePath>
      <RuntimePath Condition="'$(BinPlaceNETCoreAppPackage)' == 'true'">$(NETCoreAppPackageRuntimePath)\..\runtime</RuntimePath>
    </BinPlaceConfiguration>
    <BinPlaceConfiguration Condition="'$(IsUAP)' == 'true' AND '$(BuildingUAPVertical)' == 'true'" Include="uap-$(_bc_OSGroup)">
      <PackageFileRefPath Condition="'$(IsUAPRef)'=='true'">$(UAPPackageRefPath)</PackageFileRefPath>
      <PackageFileRuntimePath>$(UAPPackageRuntimePath)</PackageFileRuntimePath>
    </BinPlaceConfiguration>
    <BinPlaceConfiguration Condition="'$(IsUAP)' == 'true' AND '$(BuildingUAPAOTVertical)' == 'true'" Include="uapaot-$(_bc_OSGroup)">
      <PackageFileRefPath Condition="'$(IsUAPRef)'=='true'">$(UAPPackageRefPath)</PackageFileRefPath>
      <PackageFileRuntimePath>$(UAPAOTPackageRuntimePath)</PackageFileRuntimePath>
    </BinPlaceConfiguration>

    <!-- Setup the shared framework directory for testing -->
    <BinPlaceConfiguration Condition="'$(BinPlaceTestSharedFramework)' == 'true'" Include="netcoreapp-$(_bc_OSGroup)">
      <RuntimePath>$(NETCoreAppTestSharedFrameworkPath)</RuntimePath>
    </BinPlaceConfiguration>
    <!-- Setup the ILCInputFolder directory for testing uapaot -->
    <BinPlaceConfiguration Condition="'$(BinPlaceILCInputFolder)' == 'true'" Include="uapaot-$(_bc_OSGroup)">
      <RuntimePath>$(ILCFXInputFolder)</RuntimePath>
    </BinPlaceConfiguration>

    <!-- binplace targeting packs which may be different from BuildConfiguration -->
    <BinPlaceConfiguration Include="netstandard">
      <RefPath>$(RefRootPath)netstandard/</RefPath>
    </BinPlaceConfiguration>
    <BinPlaceConfiguration Condition="'$(BuildAllConfigurations)' == 'true'"
                           Include="netcoreapp">
      <RefPath>$(RefRootPath)netcoreapp/</RefPath>
    </BinPlaceConfiguration>
    <BinPlaceConfiguration Condition="'$(BuildAllConfigurations)' == 'true'"
                           Include="uap">
      <RefPath>$(RefRootPath)uap/</RefPath>
    </BinPlaceConfiguration>
    <BinPlaceConfiguration Condition="'$(BuildAllConfigurations)' == 'true'"
                           Include="netfx">
      <RefPath>$(RefRootPath)netfx/</RefPath>
    </BinPlaceConfiguration>
  </ItemGroup>

  <Target Name="BinPlace"
          DependsOnTargets="GetBinPlaceDirs;BinPlaceFiles;BinPlaceProps"
          AfterTargets="CopyFilesToOutputDirectory"
          Condition="'$(BinPlaceRef)' == 'true' OR '$(BinPlaceRuntime)' == 'true'" />

  <Target Name="BinPlaceFiles"
          Condition="'@(BinPlaceDir)' != ''"
          DependsOnTargets="GetBinPlaceItems" >

    <Message Importance="low" Text="BinPlaceDir: @(BinPlaceDir)" />

    <Copy SourceFiles="@(BinPlaceItem)"
          DestinationFolder="%(BinPlaceDir.Identity)"
          SkipUnchangedFiles="true"
          OverwriteReadOnlyFiles="true"
          Retries="$(CopyRetryCount)"
          RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
          UseHardlinksIfPossible="$(BinPlaceUseHardlinksIfPossible)">
      <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
    </Copy>
  </Target>

  <UsingTask TaskName="SaveItems" AssemblyFile="$(CoreFxToolsTaskDir)CoreFx.Tools.dll"/>
  <Target Name="BinPlaceProps"
          Condition="'@(PackageFileDir)' != ''"
          DependsOnTargets="GetBinPlaceItems" >
    <PropertyGroup>
      <_propsFilename>$(TargetName)</_propsFilename>
      <_propsFilename Condition="'$(_propsFilename)' == ''">$(MSBuildProjectName)</_propsFilename>
      <_projectDirLength>$(ProjectDir.Length)</_projectDirLength>
    </PropertyGroup>

    <ItemGroup>
      <_itemsToSave Include="@(BinPlaceItem)">
        <!-- intentionally empty: to be set by pkgproj -->
        <TargetPath></TargetPath>
      </_itemsToSave>

      <!-- Include source files. -->
      <_itemsToSave Condition="'@(Compile)' != ''" Include="@(Compile->'%(FullPath)')">
        <TargetPath>src</TargetPath>
        <TargetPath Condition="$([System.String]::Copy('%(FullPath)').StartsWith('$(ProjectDir)'))">src/$([System.String]::Copy('%(FullPath)').Substring($(_projectDirLength)).Replace('\', '/'))</TargetPath>
        <IsSourceCodeFile>true</IsSourceCodeFile>
      </_itemsToSave>
    </ItemGroup>

    <Message Importance="low" Text="PackageFileDir: @(PackageFileDir)" />

    <SaveItems ItemName="FileToPackage"
               Items="@(_itemsToSave)"
               Files="@(PackageFileDir->'%(Identity)\$(_propsFilename).props')" />
  </Target>

  <Target Name="GetBinPlaceItems" DependsOnTargets="GetCopyToOutputDirectoryItems">
    <ItemGroup>
      <BinPlaceItem Condition="Exists('$(TargetPath)')" Include="$(TargetPath)" />
      <BinPlaceItem Condition="Exists('$(TargetDir)$(TargetName).pdb')" Include="$(TargetDir)$(TargetName).pdb" />
      <BinPlaceItem Condition="'$(BinPlaceReferenceCopyLocalPaths)' != 'false'" Include="@(ReferenceCopyLocalPaths)" />
{'fraction_non_alphanumeric': 0.16918508742989113, 'fraction_numerical': 0.002111514351699109, 'mean_word_length': 5.081861958266453, 'pattern_counts': {'":': 0, '<': 247, '<?xml version=': 2, '>': 251, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '7611479', 'n_tokens_mistral': 4446, 'n_tokens_neox': 4127, 'n_words': 662}