<commit_before>﻿<!--
***********************************************************************************************
Sdk.Razor.CurrentVersion.targets

WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
          created a backup copy.  Incorrect changes to this file will make it
          impossible to load or build your projects from the command-line or the IDE.

Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<Project ToolsVersion="14.0" TreatAsLocalProperty="_RazorSdkTasksTFM;_Targeting30OrNewerRazorLangVersion">
  <!-- 
    Targets supporting Razor MSBuild integration. Contain support for generating C# code using Razor
    and including the generated code in the project lifecycle, including compiling, publishing and producing
    nuget packages.
  -->

  <!--
    This is a hook to import a set of targets before the Razor targets. By default this is unused.
  -->
  <Import Project="$(CustomBeforeRazorSdkTargets)" Condition="'$(CustomBeforeRazorSdkTargets)' != '' and Exists('$(CustomBeforeRazorSdkTargets)')"/>

  <PropertyGroup>
    <!-- Paths to tools, tasks, and extensions are calculated relative to the RazorSdkDirectoryRoot. This can be modified to test a local build. -->
    <RazorSdkDirectoryRoot Condition="'$(RazorSdkDirectoryRoot)'==''">$(MSBuildThisFileDirectory)..\..\</RazorSdkDirectoryRoot>
    <RazorSdkBuildTasksDirectoryRoot Condition="'$(RazorSdkBuildTasksDirectoryRoot)'==''">$(RazorSdkDirectoryRoot)tasks\</RazorSdkBuildTasksDirectoryRoot>
    <_RazorSdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">netstandard2.0</_RazorSdkTasksTFM>
    <_RazorSdkTasksTFM Condition=" '$(_RazorSdkTasksTFM)' == ''">net46</_RazorSdkTasksTFM>
    <RazorSdkBuildTasksAssembly>$(RazorSdkBuildTasksDirectoryRoot)$(_RazorSdkTasksTFM)\Microsoft.NET.Sdk.Razor.Tasks.dll</RazorSdkBuildTasksAssembly>
  </PropertyGroup>

  <!-- Resolve the RazorLangVersion based on values imported or TFM. -->
  <PropertyGroup>
    <_TargetFrameworkVersionWithoutV>$(TargetFrameworkVersion.TrimStart('vV'))</_TargetFrameworkVersionWithoutV>

    <!--
      Infer the RazorLangVersion if no value was specified. When adding support for newer target frameworks, list newer language versions first.
    -->
    <RazorLangVersion Condition="'$(RazorLangVersion)' == '' AND '$(_TargetFrameworkVersionWithoutV)' &gt; '2.9'">3.0</RazorLangVersion>

    <!--
      In 3.0, we expect RazorLangVersion to either be specified in the template or inferred via TFM. In 2.x, RazorLangVersion is
      specified via the Razor.Design package. We'll default to a version of 2.1, the earliest version that the SDK supports.
      A 2.1 version should result in a build warning if the project contains Components.
    -->
    <RazorLangVersion Condition="'$(RazorLangVersion)' == ''">2.1</RazorLangVersion>

    <!-- Keep this in sync with RazorLangVersion.cs if we introduce new text based values. -->
    <_Targeting30OrNewerRazorLangVersion Condition="
        '$(RazorLangVersion)' == 'Latest' OR
        '$(RazorLangVersion)' == 'Experimental' OR
        ('$(RazorLangVersion)' != '' AND '$(RazorLangVersion)' &gt; '2.9')">true</_Targeting30OrNewerRazorLangVersion><commit_msg>Ensure _TargetingNETCoreApp30OrLater is available for older design time targets (dotnet/aspnetcore-tooling#386)<commit_after>﻿<!--
***********************************************************************************************
Sdk.Razor.CurrentVersion.targets

WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
          created a backup copy.  Incorrect changes to this file will make it
          impossible to load or build your projects from the command-line or the IDE.

Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<Project ToolsVersion="14.0" TreatAsLocalProperty="_RazorSdkTasksTFM;_Targeting30OrNewerRazorLangVersion">
  <!-- 
    Targets supporting Razor MSBuild integration. Contain support for generating C# code using Razor
    and including the generated code in the project lifecycle, including compiling, publishing and producing
    nuget packages.
  -->

  <!--
    This is a hook to import a set of targets before the Razor targets. By default this is unused.
  -->
  <Import Project="$(CustomBeforeRazorSdkTargets)" Condition="'$(CustomBeforeRazorSdkTargets)' != '' and Exists('$(CustomBeforeRazorSdkTargets)')"/>

  <PropertyGroup>
    <!-- Paths to tools, tasks, and extensions are calculated relative to the RazorSdkDirectoryRoot. This can be modified to test a local build. -->
    <RazorSdkDirectoryRoot Condition="'$(RazorSdkDirectoryRoot)'==''">$(MSBuildThisFileDirectory)..\..\</RazorSdkDirectoryRoot>
    <RazorSdkBuildTasksDirectoryRoot Condition="'$(RazorSdkBuildTasksDirectoryRoot)'==''">$(RazorSdkDirectoryRoot)tasks\</RazorSdkBuildTasksDirectoryRoot>
    <_RazorSdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">netstandard2.0</_RazorSdkTasksTFM>
    <_RazorSdkTasksTFM Condition=" '$(_RazorSdkTasksTFM)' == ''">net46</_RazorSdkTasksTFM>
    <RazorSdkBuildTasksAssembly>$(RazorSdkBuildTasksDirectoryRoot)$(_RazorSdkTasksTFM)\Microsoft.NET.Sdk.Razor.Tasks.dll</RazorSdkBuildTasksAssembly>
  </PropertyGroup>

  <!-- Resolve the RazorLangVersion based on values imported or TFM. -->
  <PropertyGroup>
    <_TargetFrameworkVersionWithoutV>$(TargetFrameworkVersion.TrimStart('vV'))</_TargetFrameworkVersionWithoutV>

    <!-- Workaround for an older build of DesignTime.targets that requires this property to be available. This can be removed after 16.1 preview 2 insertion -->
    <_TargetingNETCoreApp30OrLater Condition="'$(_TargetFrameworkVersionWithoutV)' &gt; '2.9'">true</_TargetingNETCoreApp30OrLater>

    <!--
      Infer the RazorLangVersion if no value was specified. When adding support for newer target frameworks, list newer language versions first.
    -->
    <RazorLangVersion Condition="'$(RazorLangVersion)' == '' AND '$(_TargetFrameworkVersionWithoutV)' &gt; '2.9'">3.0</RazorLangVersion>

    <!--
      In 3.0, we expect RazorLangVersion to either be specified in the template or inferred via TFM. In 2.x, RazorLangVersion is
      specified via the Razor.Design package. We'll default to a version of 2.1, the earliest version that the SDK supports.
      A 2.1 version should result in a build warning if the project contains Components.
    -->
    <RazorLangVersion Condition="'$(RazorLangVersion)' == ''">2.1</RazorLangVersion>

    <!-- Keep this in sync with RazorLangVersion.cs if we introduce new text based values. -->
    <_Targeting30OrNewerRazorLangVersion Condition="
        '$(RazorLangVersion)' == 'Latest' OR
        '$(RazorLangVersion)' == 'Experimental' OR
        ('$(RazorLangVersion)' != '' AND '$(RazorLangVersion)' &gt; '2.9')">true</_Targeting30OrNewerRazorLangVersion>
{'fraction_non_alphanumeric': 0.1593437945791726, 'fraction_numerical': 0.010128388017118403, 'mean_word_length': 5.038759689922481, 'pattern_counts': {'":': 0, '<': 68, '<?xml version=': 0, '>': 68, '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': '1570650', 'n_tokens_mistral': 1911, 'n_tokens_neox': 1927, 'n_words': 553}