<commit_before>﻿<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <Description>Razor is a markup syntax for adding server-side logic to web pages. This package contains MSBuild support for Razor.</Description>
    <TargetFrameworks>$(DefaultNetCoreTargetFramework);net46</TargetFrameworks>

    <TargetName>Microsoft.NET.Sdk.Razor.Tasks</TargetName>
    <NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
    <Serviceable>true</Serviceable>
    <SdkOutputPath>$(ArtifactsBinDir)Microsoft.NET.Sdk.Razor\$(Configuration)\sdk-output\</SdkOutputPath>
    <!-- Do not disable ApiCheck. We need to be aware of when we make changes to the Tasks since they need to be backwards compatible. -->

    <!-- Allow assemblies outside of lib in the package -->
    <NoWarn>$(NoWarn);NU5100</NoWarn>
    <!-- It is intentional to not include build/netstandard2.0/Microsoft.NET.Sdk.Razor.targets -->
    <NoWarn>$(NoWarn);NU5129</NoWarn>
    <!-- Ignore file copy warnings -->
    <NoWarn>$(NoWarn);MSB3030;MSB4181</NoWarn>
    <!-- Cannot run pubternal check on net46 -->
    <DisablePubternalApiCheck>true</DisablePubternalApiCheck>
    <!-- Need to build this project in source build -->
    <ExcludeFromSourceBuild>false</ExcludeFromSourceBuild>
  </PropertyGroup>

  <ItemGroup>
    <Reference Include="Microsoft.Build.Framework" />
    <Reference Include="Microsoft.Build.Utilities.Core" />
    <Reference Include="System.Reflection.Metadata"  Condition="'$(TargetFramework)'=='net46'" />

    <Reference Include="Microsoft.AspNetCore.Mvc.Razor.Extensions" ReferenceOutputAssembly="false" Condition="'$(TargetFramework)'=='$(DefaultNetCoreTargetFramework)'" />
    <Reference Include="rzc" ReferenceOutputAssembly="false" Condition="'$(TargetFramework)'=='$(DefaultNetCoreTargetFramework)'" />
  </ItemGroup>

  <ItemGroup>
    <Compile Include="..\..\Microsoft.AspNetCore.Razor.Tools\src\ServerProtocol\*.cs">
      <Link>Shared\ServerProtocol\%(FileName)</Link>
    </Compile>
    <Compile Include="..\..\Microsoft.AspNetCore.Razor.Tools\src\PipeName.cs">
      <Link>Shared\PipeName.cs</Link>
    </Compile>
    <Compile Include="..\..\Microsoft.AspNetCore.Razor.Tools\src\MutexName.cs">
      <Link>Shared\MutexName.cs</Link>
    </Compile>
    <Compile Include="..\..\Microsoft.AspNetCore.Razor.Tools\src\Client.cs">
      <Link>Shared\Client.cs</Link>
    </Compile>
    <Compile Include="$(SharedSourceRoot)CommandLineUtils\**\*.cs" />

    <Content Include="_._" CopyToOutputDirectory="PreserveNewest" />
  </ItemGroup>

  <Target Name="LayoutDependencies" BeforeTargets="Build">
    <!-- Layout tasks, compiler, and extensions in the sdk-output folder. The entire folder structure gets packaged as-is into the SDK -->
    <MSBuild
      Projects="..\..\Microsoft.AspNetCore.Razor.Tools\src\Microsoft.AspNetCore.Razor.Tools.csproj"
      Properties="PublishDir=$(SdkOutputPath)temp;TargetFramework=netcoreapp3.0"
      Targets="Publish"
      ContinueOnError="true"  />
    <MSBuild
      Projects="..\..\Microsoft.AspNetCore.Mvc.Razor.Extensions\src\Microsoft.AspNetCore.Mvc.Razor.Extensions.csproj"
      Properties="TargetFramework=netstandard2.0"
      Targets="Build"
      Condition="'$(NoBuild)' != 'true'"
      ContinueOnError="true"  />

    <ItemGroup>
      <RazorToolsOutput Include="$(SdkOutputPath)temp\**\*.*" />
      <MvcRazorExtensionOutput Include="$(ArtifactsBinDir)Microsoft.AspNetCore.Mvc.Razor.Extensions\$(Configuration)\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll" />
    </ItemGroup>

    <Copy SourceFiles="@(RazorToolsOutput)" DestinationFolder="$(SdkOutputPath)tools\netcoreapp3.0\" SkipUnchangedFiles="true" ContinueOnError="true" />
    <Copy SourceFiles="@(MvcRazorExtensionOutput)" DestinationFolder="$(SdkOutputPath)extensions\mvc-3-0\" SkipUnchangedFiles="true" ContinueOnError="true" Condition="'$(TargetFramework)'=='$(DefaultNetCoreTargetFramework)'">
      <Output TaskParameter="CopiedFiles" ItemName="FileWrites" />
    </Copy>

    <ItemGroup>
      <ProjectOutput Include="$(ArtifactsBinDir)Microsoft.NET.Sdk.Razor\$(Configuration)\net46*\Microsoft.NET.Sdk.Razor.Tasks.*" />
      <ProjectOutput Include="$(ArtifactsBinDir)Microsoft.NET.Sdk.Razor\$(Configuration)\$(DefaultNetCoreTargetFramework)*\Microsoft.NET.Sdk.Razor.Tasks.*" />

      <ProjectOutput Include="$(ArtifactsBinDir)Microsoft.NET.Sdk.Razor\$(Configuration)\net46*\System.Collections.Immutable.dll" />
      <ProjectOutput Include="$(ArtifactsBinDir)Microsoft.NET.Sdk.Razor\$(Configuration)\net46*\System.Reflection.Metadata.dll" />
    </ItemGroup>

    <Copy SourceFiles="@(ProjectOutput)" DestinationFiles="$(SdkOutputPath)tasks\%(RecursiveDir)%(FileName)%(Extension)" SkipUnchangedFiles="true" ContinueOnError="true" >
      <Output TaskParameter="CopiedFiles" ItemName="FileWrites" />
    </Copy>

    <Message Importance="High" Text="Prepared Razor SDK at $(SdkOutputPath)" />

    <ItemGroup>
      <_PreparedRazorSdkFiles Include="$(SdkOutputPath)**\*.*" /><commit_msg>Always copy Mvc.Razor.Extensions.dll to razor sdk output (#22327)<commit_after>﻿<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <Description>Razor is a markup syntax for adding server-side logic to web pages. This package contains MSBuild support for Razor.</Description>
    <TargetFrameworks>$(DefaultNetCoreTargetFramework);net46</TargetFrameworks>

    <TargetName>Microsoft.NET.Sdk.Razor.Tasks</TargetName>
    <NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
    <Serviceable>true</Serviceable>
    <SdkOutputPath>$(ArtifactsBinDir)Microsoft.NET.Sdk.Razor\$(Configuration)\sdk-output\</SdkOutputPath>
    <!-- Do not disable ApiCheck. We need to be aware of when we make changes to the Tasks since they need to be backwards compatible. -->

    <!-- Allow assemblies outside of lib in the package -->
    <NoWarn>$(NoWarn);NU5100</NoWarn>
    <!-- It is intentional to not include build/netstandard2.0/Microsoft.NET.Sdk.Razor.targets -->
    <NoWarn>$(NoWarn);NU5129</NoWarn>
    <!-- Ignore file copy warnings -->
    <NoWarn>$(NoWarn);MSB3030;MSB4181</NoWarn>
    <!-- Cannot run pubternal check on net46 -->
    <DisablePubternalApiCheck>true</DisablePubternalApiCheck>
    <!-- Need to build this project in source build -->
    <ExcludeFromSourceBuild>false</ExcludeFromSourceBuild>
  </PropertyGroup>

  <ItemGroup>
    <Reference Include="Microsoft.Build.Framework" />
    <Reference Include="Microsoft.Build.Utilities.Core" />
    <Reference Include="System.Reflection.Metadata"  Condition="'$(TargetFramework)'=='net46'" />

    <Reference Include="Microsoft.AspNetCore.Mvc.Razor.Extensions" ReferenceOutputAssembly="false" Condition="'$(TargetFramework)'=='$(DefaultNetCoreTargetFramework)'" />
    <Reference Include="rzc" ReferenceOutputAssembly="false" Condition="'$(TargetFramework)'=='$(DefaultNetCoreTargetFramework)'" />
  </ItemGroup>

  <ItemGroup>
    <Compile Include="..\..\Microsoft.AspNetCore.Razor.Tools\src\ServerProtocol\*.cs">
      <Link>Shared\ServerProtocol\%(FileName)</Link>
    </Compile>
    <Compile Include="..\..\Microsoft.AspNetCore.Razor.Tools\src\PipeName.cs">
      <Link>Shared\PipeName.cs</Link>
    </Compile>
    <Compile Include="..\..\Microsoft.AspNetCore.Razor.Tools\src\MutexName.cs">
      <Link>Shared\MutexName.cs</Link>
    </Compile>
    <Compile Include="..\..\Microsoft.AspNetCore.Razor.Tools\src\Client.cs">
      <Link>Shared\Client.cs</Link>
    </Compile>
    <Compile Include="$(SharedSourceRoot)CommandLineUtils\**\*.cs" />

    <Content Include="_._" CopyToOutputDirectory="PreserveNewest" />
  </ItemGroup>

  <Target Name="LayoutDependencies" BeforeTargets="Build">
    <!-- Layout tasks, compiler, and extensions in the sdk-output folder. The entire folder structure gets packaged as-is into the SDK -->
    <MSBuild
      Projects="..\..\Microsoft.AspNetCore.Razor.Tools\src\Microsoft.AspNetCore.Razor.Tools.csproj"
      Properties="PublishDir=$(SdkOutputPath)temp;TargetFramework=netcoreapp3.0"
      Targets="Publish"
      ContinueOnError="true"  />
    <MSBuild
      Projects="..\..\Microsoft.AspNetCore.Mvc.Razor.Extensions\src\Microsoft.AspNetCore.Mvc.Razor.Extensions.csproj"
      Properties="TargetFramework=netstandard2.0"
      Targets="Build"
      Condition="'$(NoBuild)' != 'true'"
      ContinueOnError="true"  />

    <ItemGroup>
      <RazorToolsOutput Include="$(SdkOutputPath)temp\**\*.*" />
      <MvcRazorExtensionOutput Include="$(ArtifactsBinDir)Microsoft.AspNetCore.Mvc.Razor.Extensions\$(Configuration)\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll" />
    </ItemGroup>

    <Copy SourceFiles="@(RazorToolsOutput)" DestinationFolder="$(SdkOutputPath)tools\netcoreapp3.0\" SkipUnchangedFiles="true" ContinueOnError="true" />
    <Copy SourceFiles="@(MvcRazorExtensionOutput)" DestinationFolder="$(SdkOutputPath)extensions\mvc-3-0\" SkipUnchangedFiles="true" ContinueOnError="true">
      <Output TaskParameter="CopiedFiles" ItemName="FileWrites" />
    </Copy>

    <ItemGroup>
      <ProjectOutput Include="$(ArtifactsBinDir)Microsoft.NET.Sdk.Razor\$(Configuration)\net46*\Microsoft.NET.Sdk.Razor.Tasks.*" />
      <ProjectOutput Include="$(ArtifactsBinDir)Microsoft.NET.Sdk.Razor\$(Configuration)\$(DefaultNetCoreTargetFramework)*\Microsoft.NET.Sdk.Razor.Tasks.*" />

      <ProjectOutput Include="$(ArtifactsBinDir)Microsoft.NET.Sdk.Razor\$(Configuration)\net46*\System.Collections.Immutable.dll" />
      <ProjectOutput Include="$(ArtifactsBinDir)Microsoft.NET.Sdk.Razor\$(Configuration)\net46*\System.Reflection.Metadata.dll" />
    </ItemGroup>

    <Copy SourceFiles="@(ProjectOutput)" DestinationFiles="$(SdkOutputPath)tasks\%(RecursiveDir)%(FileName)%(Extension)" SkipUnchangedFiles="true" ContinueOnError="true" >
      <Output TaskParameter="CopiedFiles" ItemName="FileWrites" />
    </Copy>

    <Message Importance="High" Text="Prepared Razor SDK at $(SdkOutputPath)" />

    <ItemGroup>
      <_PreparedRazorSdkFiles Include="$(SdkOutputPath)**\*.*" />
{'fraction_non_alphanumeric': 0.1584207896051974, 'fraction_numerical': 0.00849575212393803, 'mean_word_length': 4.711187214611872, 'pattern_counts': {'":': 0, '<': 167, '<?xml version=': 0, '>': 167, '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': '2654077', 'n_tokens_mistral': 3083, 'n_tokens_neox': 2992, 'n_words': 436}