<commit_before><Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

  <PropertyGroup Condition="'$(NETStandardToolsTaskDirectory)' == ''">
    <NETStandardToolsTaskDirectory>$(MSBuildThisFileDirectory)</NETStandardToolsTaskDirectory>
    <NETStandardToolsTaskDirectory Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)desktop/</NETStandardToolsTaskDirectory>
  </PropertyGroup>

  <PropertyGroup>
    <NETStandardLibraryPackageVersion>#VERSION#</NETStandardLibraryPackageVersion>
  </PropertyGroup>

  <Choose>
    <!-- Allow completely disabling the conflict resolution targets-->
    <When Condition="'$(DisableHandlePackageFileConflicts)' == 'true'" />
    <!-- Condition here is a hack until https://github.com/dotnet/sdk/issues/534 is fixed -->
    <When Condition="'$(TargetFramework)' != '' or '$(TargetFrameworks)' != ''">
      <!-- NuGet 4, run after the targets that construct items from deps -->
      <PropertyGroup>
        <HandlePackageFileConflictsAfter>ResolvePackageDependenciesForBuild</HandlePackageFileConflictsAfter>
        <HandlePublishFileConflictsAfter>RunResolvePublishAssemblies</HandlePublishFileConflictsAfter>
        <RemoveDepsFileConflictsAfter>GenerateBuildDependencyFile</RemoveDepsFileConflictsAfter>
        <RemovePublishDepsFileConflictsAfter>GeneratePublishDependencyFile</RemovePublishDepsFileConflictsAfter>
        <!-- If CopyLocalLockFileAssemblies is not true the host will run from packages,
             but we still need to consider those package items for conflicts -->
        <HandlePackageFileConflictsDependsOn Condition="'$(CopyLocalLockFileAssemblies)' != 'true'">_GetLockFileAssemblies</HandlePackageFileConflictsDependsOn>
      </PropertyGroup>
    </When>
    <When Condition="'$(ResolveNuGetPackages)' == 'true' and Exists('$(ProjectLockFile)')">
      <!-- NuGet 3, run after the target that constructs items from lock file -->
      <PropertyGroup>
        <HandlePackageFileConflictsAfter>ResolveNuGetPackageAssets</HandlePackageFileConflictsAfter>
      </PropertyGroup>
    </When>
    <Otherwise>
      <!-- NuGet 2, run before targets that consume references -->
      <PropertyGroup>
        <ResolveAssemblyReferencesDependsOn>$(ResolveAssemblyReferencesDependsOn);HandlePackageFileConflicts</ResolveAssemblyReferencesDependsOn>
        <PrepareResourcesDependsOn>HandlePackageFileConflicts;$(PrepareResourcesDependsOn)</PrepareResourcesDependsOn>
      </PropertyGroup>
    </Otherwise>
  </Choose>

  <ItemGroup>
    <Reference Condition="'$(_NetStandardLibraryRefPath)' != ''" Include="$(_NetStandardLibraryRefPath)*.dll">
      <!-- Private = false to make these reference only -->
      <Private>false</Private>
      <NuGetPackageId>NETStandard.Library</NuGetPackageId>
      <NuGetPackageVersion>$(NETStandardLibraryPackageVersion)</NuGetPackageVersion>
      <NuGetIsFrameworkReference>false</NuGetIsFrameworkReference>
      <NuGetSourceType>Package</NuGetSourceType>
    </Reference>
    <ReferenceCopyLocalPaths Condition="'$(_NetStandardLibraryLibPath)' != ''" Include="$(_NetStandardLibraryLibPath)*.dll">
      <Private>false</Private>
      <NuGetPackageId>NETStandard.Library</NuGetPackageId>
      <NuGetPackageVersion>$(NETStandardLibraryPackageVersion)</NuGetPackageVersion>
      <NuGetIsFrameworkReference>false</NuGetIsFrameworkReference>
      <NuGetSourceType>Package</NuGetSourceType>
    </ReferenceCopyLocalPaths>
  </ItemGroup>

  <Target Name="_GetLockFileAssemblies"
          DependsOnTargets="ComputePrivateAssetsPackageReferences;
                            _DefaultMicrosoftNETPlatformLibrary">
    <!-- Essentially a copy of the SDKs RunResolvePublishAssemblies.
         We need to find all the files that will be loaded from deps for conflict resolution.-->
    <ResolvePublishAssemblies ProjectPath="$(MSBuildProjectFullPath)"
                              AssetsFilePath="$(ProjectAssetsFile)"
                              TargetFramework="$(TargetFrameworkMoniker)"
                              RuntimeIdentifier="$(RuntimeIdentifier)"
                              PlatformLibraryName="$(MicrosoftNETPlatformLibrary)"
                              PrivateAssetsPackageReferences="@(PrivateAssetsPackageReference)">

      <Output TaskParameter="AssembliesToPublish" ItemName="_LockFileAssemblies" />

    </ResolvePublishAssemblies>
  </Target>

  <UsingTask TaskName="HandlePackageFileConflicts" AssemblyFile="$(NETStandardToolsTaskDirectory)NETStandard.Tools.dll" />
  <Target Name="HandlePackageFileConflicts" AfterTargets="$(HandlePackageFileConflictsAfter)" DependsOnTargets="$(HandlePackageFileConflictsDependsOn)">
    <HandlePackageFileConflicts References="@(Reference)"
                                ReferenceCopyLocalPaths="@(ReferenceCopyLocalPaths)"
                                OtherRuntimeItems="@(_LockFileAssemblies)"
                                PlatformManifests="@(PackageConflictPlatformManifests)"
                                PreferredPackages="$(PackageConflictPreferredPackages)">
      <Output TaskParameter="ReferencesWithoutConflicts" ItemName="_ReferencesWithoutConflicts" />
      <Output TaskParameter="ReferenceCopyLocalPathsWithoutConflicts" ItemName="_ReferenceCopyLocalPathsWithoutConflicts" />
      <Output TaskParameter="Conflicts" ItemName="_ConflictPackageFiles" />
    </HandlePackageFileConflicts>

    <!-- Replace Reference / ReferenceCopyLocalPaths with the filtered lists.
         We must remove all and include rather than just remove since removal is based
         only on ItemSpec and duplicate ItemSpecs may exist with different metadata 
         (eg: HintPath) -->
    <ItemGroup>
      <Reference Remove="@(Reference)" />
      <Reference Include="@(_ReferencesWithoutConflicts)" />
      <ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" />
      <ReferenceCopyLocalPaths Include="@(_ReferenceCopyLocalPathsWithoutConflicts)" />
    </ItemGroup>
  </Target>

  <PropertyGroup>
    <_RemoveDepsFileConflictsSemaphore>$(IntermediateOutputPath)\RemoveDepsFileConflicts.semaphore</_RemoveDepsFileConflictsSemaphore>
  </PropertyGroup>
  <UsingTask TaskName="RemoveDepsFileConflicts" AssemblyFile="$(NETStandardToolsTaskDirectory)NETStandard.Tools.dll" />
  <Target Name="RemoveDepsFileConflicts" AfterTargets="$(RemoveDepsFileConflictsAfter)"
          Inputs="$(ProjectDepsFilePath)" Outputs="$(_RemoveDepsFileConflictsSemaphore)">
    <RemoveDepsFileConflicts DepsFilePath="$(ProjectDepsFilePath)" Conflicts="@(_ConflictPackageFiles)" />

    <Touch Files="$(_RemoveDepsFileConflictsSemaphore)" AlwaysCreate="true">
      <Output TaskParameter="TouchedFiles" ItemName="FileWrites" />
    </Touch>
  </Target>

  <Target Name="HandlePublishFileConflicts" AfterTargets="$(HandlePublishFileConflictsAfter)">
    <HandlePackageFileConflicts ReferenceCopyLocalPaths="@(ResolvedAssembliesToPublish)"
                                PlatformManifests="@(PackageConflictPlatformManifests)"
                                PreferredPackages="$(PackageConflictPreferredPackages)">
      <Output TaskParameter="ReferenceCopyLocalPathsWithoutConflicts" ItemName="_ResolvedAssembliesToPublishWithoutConflicts" />
      <Output TaskParameter="Conflicts" ItemName="_PublishConflictPackageFiles" /><commit_msg>Make the build target work when deps file isn't generated.<commit_after><Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

  <PropertyGroup Condition="'$(NETStandardToolsTaskDirectory)' == ''">
    <NETStandardToolsTaskDirectory>$(MSBuildThisFileDirectory)</NETStandardToolsTaskDirectory>
    <NETStandardToolsTaskDirectory Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)desktop/</NETStandardToolsTaskDirectory>
  </PropertyGroup>

  <PropertyGroup>
    <NETStandardLibraryPackageVersion>#VERSION#</NETStandardLibraryPackageVersion>
  </PropertyGroup>

  <Choose>
    <!-- Allow completely disabling the conflict resolution targets-->
    <When Condition="'$(DisableHandlePackageFileConflicts)' == 'true'" />
    <!-- Condition here is a hack until https://github.com/dotnet/sdk/issues/534 is fixed -->
    <When Condition="'$(TargetFramework)' != '' or '$(TargetFrameworks)' != ''">
      <!-- NuGet 4, run after the targets that construct items from deps -->
      <PropertyGroup>
        <HandlePackageFileConflictsAfter>ResolvePackageDependenciesForBuild</HandlePackageFileConflictsAfter>
        <HandlePublishFileConflictsAfter>RunResolvePublishAssemblies</HandlePublishFileConflictsAfter>
        <RemoveDepsFileConflictsAfter>GenerateBuildDependencyFile</RemoveDepsFileConflictsAfter>
        <RemovePublishDepsFileConflictsAfter>GeneratePublishDependencyFile</RemovePublishDepsFileConflictsAfter>
        <!-- If CopyLocalLockFileAssemblies is not true the host will run from packages,
             but we still need to consider those package items for conflicts -->
        <HandlePackageFileConflictsDependsOn Condition="'$(CopyLocalLockFileAssemblies)' != 'true'">_GetLockFileAssemblies</HandlePackageFileConflictsDependsOn>
      </PropertyGroup>
    </When>
    <When Condition="'$(ResolveNuGetPackages)' == 'true' and Exists('$(ProjectLockFile)')">
      <!-- NuGet 3, run after the target that constructs items from lock file -->
      <PropertyGroup>
        <HandlePackageFileConflictsAfter>ResolveNuGetPackageAssets</HandlePackageFileConflictsAfter>
      </PropertyGroup>
    </When>
    <Otherwise>
      <!-- NuGet 2, run before targets that consume references -->
      <PropertyGroup>
        <ResolveAssemblyReferencesDependsOn>$(ResolveAssemblyReferencesDependsOn);HandlePackageFileConflicts</ResolveAssemblyReferencesDependsOn>
        <PrepareResourcesDependsOn>HandlePackageFileConflicts;$(PrepareResourcesDependsOn)</PrepareResourcesDependsOn>
      </PropertyGroup>
    </Otherwise>
  </Choose>

  <ItemGroup>
    <Reference Condition="'$(_NetStandardLibraryRefPath)' != ''" Include="$(_NetStandardLibraryRefPath)*.dll">
      <!-- Private = false to make these reference only -->
      <Private>false</Private>
      <NuGetPackageId>NETStandard.Library</NuGetPackageId>
      <NuGetPackageVersion>$(NETStandardLibraryPackageVersion)</NuGetPackageVersion>
      <NuGetIsFrameworkReference>false</NuGetIsFrameworkReference>
      <NuGetSourceType>Package</NuGetSourceType>
    </Reference>
    <ReferenceCopyLocalPaths Condition="'$(_NetStandardLibraryLibPath)' != ''" Include="$(_NetStandardLibraryLibPath)*.dll">
      <Private>false</Private>
      <NuGetPackageId>NETStandard.Library</NuGetPackageId>
      <NuGetPackageVersion>$(NETStandardLibraryPackageVersion)</NuGetPackageVersion>
      <NuGetIsFrameworkReference>false</NuGetIsFrameworkReference>
      <NuGetSourceType>Package</NuGetSourceType>
    </ReferenceCopyLocalPaths>
  </ItemGroup>

  <Target Name="_GetLockFileAssemblies"
          DependsOnTargets="ComputePrivateAssetsPackageReferences;
                            _DefaultMicrosoftNETPlatformLibrary">
    <!-- Essentially a copy of the SDKs RunResolvePublishAssemblies.
         We need to find all the files that will be loaded from deps for conflict resolution.-->
    <ResolvePublishAssemblies ProjectPath="$(MSBuildProjectFullPath)"
                              AssetsFilePath="$(ProjectAssetsFile)"
                              TargetFramework="$(TargetFrameworkMoniker)"
                              RuntimeIdentifier="$(RuntimeIdentifier)"
                              PlatformLibraryName="$(MicrosoftNETPlatformLibrary)"
                              PrivateAssetsPackageReferences="@(PrivateAssetsPackageReference)">

      <Output TaskParameter="AssembliesToPublish" ItemName="_LockFileAssemblies" />

    </ResolvePublishAssemblies>
  </Target>

  <UsingTask TaskName="HandlePackageFileConflicts" AssemblyFile="$(NETStandardToolsTaskDirectory)NETStandard.Tools.dll" />
  <Target Name="HandlePackageFileConflicts" AfterTargets="$(HandlePackageFileConflictsAfter)" DependsOnTargets="$(HandlePackageFileConflictsDependsOn)">
    <HandlePackageFileConflicts References="@(Reference)"
                                ReferenceCopyLocalPaths="@(ReferenceCopyLocalPaths)"
                                OtherRuntimeItems="@(_LockFileAssemblies)"
                                PlatformManifests="@(PackageConflictPlatformManifests)"
                                PreferredPackages="$(PackageConflictPreferredPackages)">
      <Output TaskParameter="ReferencesWithoutConflicts" ItemName="_ReferencesWithoutConflicts" />
      <Output TaskParameter="ReferenceCopyLocalPathsWithoutConflicts" ItemName="_ReferenceCopyLocalPathsWithoutConflicts" />
      <Output TaskParameter="Conflicts" ItemName="_ConflictPackageFiles" />
    </HandlePackageFileConflicts>

    <!-- Replace Reference / ReferenceCopyLocalPaths with the filtered lists.
         We must remove all and include rather than just remove since removal is based
         only on ItemSpec and duplicate ItemSpecs may exist with different metadata 
         (eg: HintPath) -->
    <ItemGroup>
      <Reference Remove="@(Reference)" />
      <Reference Include="@(_ReferencesWithoutConflicts)" />
      <ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" />
      <ReferenceCopyLocalPaths Include="@(_ReferenceCopyLocalPathsWithoutConflicts)" />
    </ItemGroup>
  </Target>

  <PropertyGroup>
    <_RemoveDepsFileConflictsSemaphore>$(IntermediateOutputPath)\RemoveDepsFileConflicts.semaphore</_RemoveDepsFileConflictsSemaphore>
  </PropertyGroup>
  <UsingTask TaskName="RemoveDepsFileConflicts" AssemblyFile="$(NETStandardToolsTaskDirectory)NETStandard.Tools.dll" />
  <Target Name="RemoveDepsFileConflicts" AfterTargets="$(RemoveDepsFileConflictsAfter)"
          Inputs="$(ProjectDepsFilePath)" Outputs="$(_RemoveDepsFileConflictsSemaphore)"
          Condition="'$(GenerateDependencyFile)'=='true'">
    <RemoveDepsFileConflicts DepsFilePath="$(ProjectDepsFilePath)" Conflicts="@(_ConflictPackageFiles)" />

    <Touch Files="$(_RemoveDepsFileConflictsSemaphore)" AlwaysCreate="true">
      <Output TaskParameter="TouchedFiles" ItemName="FileWrites" />
    </Touch>
  </Target>

  <Target Name="HandlePublishFileConflicts" AfterTargets="$(HandlePublishFileConflictsAfter)">
    <HandlePackageFileConflicts ReferenceCopyLocalPaths="@(ResolvedAssembliesToPublish)"
                                PlatformManifests="@(PackageConflictPlatformManifests)"
                                PreferredPackages="$(PackageConflictPreferredPackages)">
      <Output TaskParameter="ReferenceCopyLocalPathsWithoutConflicts" ItemName="_ResolvedAssembliesToPublishWithoutConflicts" />
      <Output TaskParameter="Conflicts" ItemName="_PublishConflictPackageFiles" />
{'fraction_non_alphanumeric': 0.1040579906510399, 'fraction_numerical': 0.0013549217532687486, 'mean_word_length': 4.5621703089675965, 'pattern_counts': {'":': 0, '<': 225, '<?xml version=': 0, '>': 225, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '6884333', 'n_tokens_mistral': 3905, 'n_tokens_neox': 3531, 'n_words': 578}