<commit_before><Project>

  <PropertyGroup>
    <IntermediateOutputPath Condition="$(IntermediateOutputPath) == '' Or $(IntermediateOutputPath) == '*Undefined*'">$(MSBuildProjectDirectory)obj\$(Configuration)\</IntermediateOutputPath>
    <RefitTaskAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\..\build\MSBuildCore20\InterfaceStubGenerator.BuildTasks.dll</RefitTaskAssemblyFile>
    <RefitTaskAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\..\build\MSBuildFull46\InterfaceStubGenerator.BuildTasks.dll</RefitTaskAssemblyFile>

    <RefitMinCoreVersionRequired>2.1</RefitMinCoreVersionRequired>
    <!-- Our default CLI version for error checking purposes -->
    <RefitNetCoreAppVersion>$(BundledNETCoreAppTargetFrameworkVersion)</RefitNetCoreAppVersion>
    <RefitNetCoreAppVersion Condition="'$(RefitNetCoreAppVersion)' == ''">1.0</RefitNetCoreAppVersion>

    <!--
    Refit internal namespace to be added to internally generated Refit code. 
    Can be overriden by user in case of namespace clashes.
    -->
    <RefitInternalNamespace Condition=" '$(RefitInternalNamespace)' == '' ">$(RootNamespace)</RefitInternalNamespace>

    <RefitGeneratedFile>$(IntermediateOutputPath)\RefitStubs.g.cs</RefitGeneratedFile>
  </PropertyGroup>

  <UsingTask TaskName="Refit.Generator.Tasks.GenerateStubsTask" AssemblyFile="$(RefitTaskAssemblyFile)" />
  <!--
    BH: Checking that the project type is a csproj, otherwise don't execute
    https://github.com/reactiveui/refit/issues/811
  -->
  <Target Name="GenerateRefitStubs" BeforeTargets="BeforeCompile;CoreCompile" Inputs="@(Compile)" Outputs="$(RefitGeneratedFile)" Condition="$(MSBuildProjectFile.EndsWith('.csproj'))">
    <Error Condition="'$(MSBuildRuntimeType)' == 'Core' and '$(RefitMinCoreVersionRequired)' > '$(RefitNetCoreAppVersion)' "
           Text="Refit requires at least the .NET Core SDK v2.1 to run with 'dotnet build'"
           ContinueOnError="false"
           />

    <GenerateStubsTask SourceFiles="@(Compile)"
                       BaseDirectory="$(MSBuildProjectDirectory)"
                       OutputFile="$(RefitGeneratedFile)"
                       RefitInternalNamespace="$(RefitInternalNamespace)"
                       />

    <Message Text="Processed Refit Stubs" />

    <ItemGroup Condition="Exists('$(RefitGeneratedFile)')">
      <Compile Include="$(RefitGeneratedFile)" />
      <FileWrites Include="$(RefitGeneratedFile)" />
    </ItemGroup>
  </Target>

</Project><commit_msg>Better patch for #811<commit_after><Project>

  <PropertyGroup>
    <IntermediateOutputPath Condition="$(IntermediateOutputPath) == '' Or $(IntermediateOutputPath) == '*Undefined*'">$(MSBuildProjectDirectory)obj\$(Configuration)\</IntermediateOutputPath>
    <RefitTaskAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\..\build\MSBuildCore20\InterfaceStubGenerator.BuildTasks.dll</RefitTaskAssemblyFile>
    <RefitTaskAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\..\build\MSBuildFull46\InterfaceStubGenerator.BuildTasks.dll</RefitTaskAssemblyFile>

    <RefitMinCoreVersionRequired>2.1</RefitMinCoreVersionRequired>
    <!-- Our default CLI version for error checking purposes -->
    <RefitNetCoreAppVersion>$(BundledNETCoreAppTargetFrameworkVersion)</RefitNetCoreAppVersion>
    <RefitNetCoreAppVersion Condition="'$(RefitNetCoreAppVersion)' == ''">1.0</RefitNetCoreAppVersion>

    <!--
    Refit internal namespace to be added to internally generated Refit code. 
    Can be overriden by user in case of namespace clashes.
    -->
    <RefitInternalNamespace Condition=" '$(RefitInternalNamespace)' == '' ">$(RootNamespace)</RefitInternalNamespace>

    <RefitGeneratedFile>$(IntermediateOutputPath)\RefitStubs.g.cs</RefitGeneratedFile>
  </PropertyGroup>

  <UsingTask TaskName="Refit.Generator.Tasks.GenerateStubsTask" AssemblyFile="$(RefitTaskAssemblyFile)" />
  <!--
    BH: Checking that the project type is a csproj, otherwise don't execute
    https://github.com/reactiveui/refit/issues/811
  -->
  <Target Name="GenerateRefitStubs" BeforeTargets="BeforeCompile;CoreCompile" Inputs="@(Compile)" Outputs="$(RefitGeneratedFile)" Condition="$(Language) == 'C#'">
    <Error Condition="'$(MSBuildRuntimeType)' == 'Core' and '$(RefitMinCoreVersionRequired)' > '$(RefitNetCoreAppVersion)' "
           Text="Refit requires at least the .NET Core SDK v2.1 to run with 'dotnet build'"
           ContinueOnError="false"
           />

    <GenerateStubsTask SourceFiles="@(Compile)"
                       BaseDirectory="$(MSBuildProjectDirectory)"
                       OutputFile="$(RefitGeneratedFile)"
                       RefitInternalNamespace="$(RefitInternalNamespace)"
                       />

    <Message Text="Processed Refit Stubs" />

    <ItemGroup Condition="Exists('$(RefitGeneratedFile)')">
      <Compile Include="$(RefitGeneratedFile)" />
      <FileWrites Include="$(RefitGeneratedFile)" />
    </ItemGroup>
  </Target>

</Project>
{'fraction_non_alphanumeric': 0.1392156862745098, 'fraction_numerical': 0.005686274509803921, 'mean_word_length': 4.642699115044247, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 0, '>': 71, 'https://': 2, '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': '1331542', 'n_tokens_mistral': 1472, 'n_tokens_neox': 1338, 'n_words': 231}