File: MSBuild.csproj
Web Access
Project: ..\..\..\src\MSBuild\MSBuild.csproj (MSBuild)
<Project Sdk="Microsoft.NET.Sdk">
 
  <Import Project="..\Shared\FileSystemSources.proj" />
  <Import Project="..\Shared\DebuggingSources.proj" />
 
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFrameworks>$(RuntimeOutputTargetFrameworks)</TargetFrameworks>
    <PlatformTarget>$(RuntimeOutputPlatformTarget)</PlatformTarget>
    <!-- MSBuild.exe needs to be architecture specific, the rest of the .dlls can be AnyCPU. -->
    <PlatformTarget Condition="'$(Platform)' == 'arm64'">arm64</PlatformTarget>
 
    <!-- MSBuild.csproj no longer uses apphost. This fixes an issue where certain tests would find
         MSBuild.exe AND MSBuild.dll when they should only find MSBuild.dll. -->
    <UseAppHost>false</UseAppHost>
 
    <!-- Set RuntimeIdentifiers so that NuGet will restore for both AnyCPU as well as x86 and x64.
         This is important for the MSBuild.VSSetup project, which "references" both the x86 and x64
         versions of this project -->
    <RuntimeIdentifiers Condition="'$(DotNetBuildFromSource)' != 'true'">win7-x86;win7-x64</RuntimeIdentifiers>
    <UseRidGraph>true</UseRidGraph>
 
    <EnableDefaultItems>false</EnableDefaultItems>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <AssemblyName>MSBuild</AssemblyName>
    <RootNamespace>Microsoft.Build.CommandLine</RootNamespace>
    <ApplicationIcon>MSBuild.ico</ApplicationIcon>
    <LargeAddressAware>true</LargeAddressAware>
 
    <UseVSHostingProcess>false</UseVSHostingProcess>
    <ApplicationManifest>MSBuild.exe.manifest</ApplicationManifest>
 
    <AppConfig>app.config</AppConfig>
    <!-- Temporary solution for
         https://github.com/dotnet/msbuild/issues/834 Long term
         two files should be generated from a single source. -->
    <AppConfig Condition="'$(Platform)' == 'x64' or '$(Platform)' == 'arm64'">app.amd64.config</AppConfig>
    <!-- Disable binding redirect generation: we want to be deliberate
         about the redirects we expose plugins to, and we explicitly
         redirect ValueTuple _down_ to match VS. -->
    <AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
 
    <IsPackable>true</IsPackable>
    <ContentTargetFolders>contentFiles</ContentTargetFolders>
    <BuildOutputTargetFolder>contentFiles\any\</BuildOutputTargetFolder>
    <PackageId>Microsoft.Build.Runtime</PackageId>
    <PackageDescription>This package delivers a complete executable copy of MSBuild. Reference this package only if your application needs to load projects or execute in-process builds without requiring installation of MSBuild. Successfully evaluating projects using this package requires aggregating additional components (like the compilers) into an application directory.</PackageDescription>
    <IncludeSatelliteOutputInPack>false</IncludeSatelliteOutputInPack>
    <NoPackageAnalysis>true</NoPackageAnalysis>
    <AddAppConfigToBuildOutputs>false</AddAppConfigToBuildOutputs>
 
    <!-- Setting DebugType here goes hand in hand with eng\AfterSigning.targets. This is to prompt the x64 build to produce a 'full' .pdb that's `more compatible` then 'portable' and 'embedded' .pdbs. This doesn't get set on 32 bit architecture, which will default to 'embedded' and 'pdb2pdb' will convert those as needed. See https://github.com/dotnet/msbuild/pull/5070 for context. -->
    <DebugType Condition="'$(Platform)' == 'x64'">full</DebugType>
    <DefineConstants>$(DefineConstants);MSBUILDENTRYPOINTEXE</DefineConstants>
  </PropertyGroup>
 
  <PropertyGroup>
    <AllowedReferenceRelatedFileExtensions>$(AllowedReferenceRelatedFileExtensions);.tlb</AllowedReferenceRelatedFileExtensions>
  </PropertyGroup>
 
  <ItemGroup>
    <Compile Include="..\Shared\BuildEnvironmentHelper.cs">
      <Link>BuildEnvironmentHelper.cs</Link>
    </Compile>
    <Compile Include="..\Shared\AssemblyNameComparer.cs">
      <Link>AssemblyNameComparer.cs</Link>
    </Compile>
    <Compile Include="..\Shared\CollectionHelpers.cs" />
    <Compile Include="..\Shared\FileDelegates.cs">
      <Link>FileDelegates.cs</Link>
    </Compile>
    <Compile Include="..\Shared\FileUtilities.cs">
      <Link>FileUtilities.cs</Link>
    </Compile>
    <Compile Include="..\Build\Instance\ReflectableTaskPropertyInfo.cs" />
    <Compile Include="..\Shared\FileUtilitiesRegex.cs">
      <Link>FileUtilitiesRegex.cs</Link>
    </Compile>
    <Compile Include="..\Shared\IConstrainedEqualityComparer.cs">
      <Link>IConstrainedEqualityComparer.cs</Link>
    </Compile>
    <Compile Include="..\Shared\QuotingUtilities.cs" />
    <Compile Include="..\Shared\RegisteredTaskObjectCacheBase.cs">
      <Link>RegisteredTaskObjectCacheBase.cs</Link>
    </Compile>
    <Compile Include="..\Shared\ResourceUtilities.cs" />
    <Compile Include="..\Shared\EscapingUtilities.cs" />
    <Compile Include="..\Shared\ErrorUtilities.cs" />
    <Compile Include="..\Shared\Modifiers.cs" />
    <Compile Include="..\Shared\XMakeElements.cs" />
    <Compile Include="..\Shared\BufferedReadStream.cs" />
    <Compile Include="..\Shared\CopyOnWriteDictionary.cs" />
    <Compile Include="..\Shared\IKeyed.cs" />
    <Compile Include="..\Shared\MSBuildNameIgnoreCaseComparer.cs" />
    <Compile Include="..\Shared\NamedPipeUtil.cs" />
    <Compile Include="..\Shared\ReadOnlyEmptyCollection.cs" />
    <Compile Include="..\Shared\ReadOnlyEmptyDictionary.cs" />
    <Compile Include="..\Shared\ExceptionHandling.cs" />
    <Compile Include="..\Shared\EventArgsFormatting.cs" />
    <Compile Include="..\Shared\TempFileUtilities.cs">
      <Link>TempFileUtilities.cs</Link>
    </Compile>
    <Compile Include="..\Shared\XMakeAttributes.cs" />
    <Compile Include="..\Shared\INodeEndpoint.cs" />
    <Compile Include="..\Shared\NodeEndpointOutOfProcBase.cs" />
    <Compile Include="..\Shared\INodePacket.cs" />
    <Compile Include="..\Shared\LogMessagePacketBase.cs" />
    <Compile Include="..\Shared\INodePacketFactory.cs" />
    <Compile Include="..\Shared\NodePacketFactory.cs" />
    <Compile Include="..\Shared\INodePacketHandler.cs" />
    <Compile Include="..\Shared\TranslatorHelpers.cs" />
    <Compile Include="..\Shared\CommunicationsUtilities.cs" />
    <Compile Include="..\Shared\InterningBinaryReader.cs" />
    <Compile Include="..\Shared\TaskHostConfiguration.cs" />
    <Compile Include="..\Shared\TaskHostTaskComplete.cs" />
    <Compile Include="..\Shared\OutOfProcTaskHostTaskResult.cs" />
    <Compile Include="..\Shared\TaskHostTaskCancelled.cs" />
    <Compile Include="..\Shared\TaskLoader.cs" />
    <Compile Include="..\Shared\MSBuildLoadContext.cs" Condition="'$(TargetFrameworkIdentifier)'!='.NETFramework'" />
    <Compile Include="..\Shared\TypeLoader.cs" />
    <Compile Include="..\Shared\LoadedType.cs" />
    <Compile Include="..\Shared\AssemblyLoadInfo.cs" />
    <Compile Include="..\Shared\NodeBuildComplete.cs" />
    <Compile Include="..\Shared\NodeShutdown.cs" />
    <Compile Include="..\Shared\TaskParameter.cs" />
    <Compile Include="..\Shared\TaskParameterTypeVerifier.cs" />
    <Compile Include="..\Shared\TaskEngineAssemblyResolver.cs" />
    <Compile Include="..\Shared\AssemblyNameExtension.cs" />
    <Compile Include="..\Shared\ThreadPoolExtensions.cs" />
    <Compile Include="..\Shared\StringExtensions.cs" />
    <Compile Include="..\Shared\ConversionUtilities.cs" />
    <Compile Include="AssemblyInfo.cs" />
    <Compile Include="AssemblyResources.cs" />
    <Compile Include="AutomaticEncodingRestorer.cs" />
    <Compile Include="CommandLineSwitches.cs" />
    <Compile Include="CommandLineSwitchException.cs" />
    <Compile Include="..\Shared\CoreCLRAssemblyLoader.cs" Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'" />
    <Compile Include="DistributedLoggerRecord.cs" />
    <Compile Include="TerminalLogger\*.cs" />
    <Compile Include="InitializationException.cs" />
    <Compile Include="MSBuildClientApp.cs" />
    <Compile Include="NodeEndpointOutOfProcTaskHost.cs" />
    <Compile Include="LogMessagePacket.cs" />
    <Compile Include="ProjectSchemaValidationHandler.cs" />
    <Compile Include="OutOfProcTaskHostNode.cs" />
    <Compile Include="OutOfProcTaskAppDomainWrapperBase.cs" />
    <Compile Include="OutOfProcTaskAppDomainWrapper.cs" />
    <Compile Include="PerformanceLogEventListener.cs" />
    <Compile Include="JsonOutputFormatter.cs" />
    <Compile Include="XMake.cs" />
    <!-- This is to enable CodeMarkers in MSBuild.exe -->
    <!-- Win32 RC Files -->
    <RCResourceFile Include="native.rc" />
    <!-- Resource Files -->
    <EmbeddedResource Include="Resources\Strings.resx">
      <LogicalName>$(AssemblyName).Strings.resources</LogicalName>
      <SubType>Designer</SubType>
    </EmbeddedResource>
    <EmbeddedResource Include="..\Shared\Resources\Strings.shared.resx">
      <Link>Resources\Strings.shared.resx</Link>
      <LogicalName>$(AssemblyName).Strings.shared.resources</LogicalName>
      <SubType>Designer</SubType>
    </EmbeddedResource>
    <!-- Content Files -->
    <Content Include="MSBuild.ico" Pack="false" />
    <Content Include="MSBuild.rsp" Pack="false">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <XsdsForVS Include="**\*.xsd" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
    <XsdsForVS Include="Update-MSBuildXsds.ps1" />
    <None Include="@(XsdsForVS)">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.BuildXL.Processes" Condition="'$(FeatureReportFileAccesses)' == 'true'" PrivateAssets="all" />
    <PackageReference Include="Microsoft.IO.Redist" Condition="'$(FeatureMSIORedist)' == 'true'" />
    <PackageReference Include="System.Configuration.ConfigurationManager" />
  </ItemGroup>
  <!-- Manually download this library for RoslynCodeTaskFactory.
           See target AddRefAssemblies below. -->
  <ItemGroup>
    <PackageDownload Include="netstandard.library">
      <Version>[2.0.3]</Version>
    </PackageDownload>
  </ItemGroup>
  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
    <!-- File for Assemblies we depend on -->
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="System.Xml" />
    <PackageReference Include="LargeAddressAware" PrivateAssets="All" />
  </ItemGroup>
  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework' AND '$(DotNetBuildFromSource)' != 'true'">
    <!-- Bump these to the latest version despite transitive references to older -->
    <PackageReference Include="System.Private.Uri" PrivateAssets="all" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\Build\Microsoft.Build.csproj" />
    <ProjectReference Include="..\Framework\Microsoft.Build.Framework.csproj" PrivateAssets="All" />
    <ProjectReference Include="..\Tasks\Microsoft.Build.Tasks.csproj" />
  </ItemGroup>
 
  <!-- Xsds are not TF or arch-specific so copy once them in the outer build -->
  <Target Name="CopyXsds" BeforeTargets="Build" Condition="'$(IsInnerBuild)' != 'true'">
    <Copy SourceFiles="@(XsdsForVS)" DestinationFiles="@(XsdsForVS-&gt;'$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'xsd'))%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
  </Target>
 
  <!-- Include MSBuild.deps.json and MSBuild.runtimeconfig.json in ContentWithTargetPath so they will be copied to the output folder of projects
       that reference this one. -->
  <Target Name="AddRuntimeDependenciesToContent" Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp'" BeforeTargets="GetCopyToOutputDirectoryItems">
    <ItemGroup>
      <ContentWithTargetPath Include="$(ProjectDepsFilePath)" CopyToOutputDirectory="PreserveNewest" TargetPath="$(ProjectDepsFileName)" />
 
      <ContentWithTargetPath Include="$(ProjectRuntimeConfigFilePath)" CopyToOutputDirectory="PreserveNewest" TargetPath="$(ProjectRuntimeConfigFileName)" />
      <ContentWithTargetPath Include="$(ProjectRuntimeConfigDevFilePath)" CopyToOutputDirectory="PreserveNewest" TargetPath="$([System.IO.Path]::GetFileName('$(ProjectRuntimeConfigDevFilePath)'))" />
    </ItemGroup>
  </Target>
 
  <!-- Redistribute core assemblies so that RoslynCodeTaskFactory can reference
       them when creating assemblies at build time.
 
       Don't add these to the Content list before RAR, because that might result
       in resolving references using them instead of the correct build-time references.
       Instead, add them just afterward, before assigning target paths/copying to
       the bin folder. -->
  <Target Name="AddRefAssemblies" DependsOnTargets="ResolveAssemblyReferences" BeforeTargets="AssignTargetPaths">
    <ItemGroup>
      <Content Include="$(NuGetPackageRoot)\netstandard.library\2.0.3\build\netstandard2.0\ref\netstandard.dll" Link="ref\netstandard.dll" CopyToOutputDirectory="PreserveNewest" />
      <Content Include="$(NuGetPackageRoot)\netstandard.library\2.0.3\build\netstandard2.0\ref\mscorlib.dll" Link="ref\mscorlib.dll" CopyToOutputDirectory="PreserveNewest" />
    </ItemGroup>
  </Target>
 
  <Target Name="GetCustomPackageFiles" BeforeTargets="_GetPackageFiles" DependsOnTargets="RemoveSatelliteDllsFromBuildOutputInPackage">
 
    <ItemGroup>
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\MSBuild.exe.config" TargetFramework="%(_TargetFrameworks.Identity)" Condition=" '%(_TargetFrameworks.Identity)' == '$(FullFrameworkTFM)' " />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Build.Framework.tlb" TargetFramework="%(_TargetFrameworks.Identity)" Condition=" '%(_TargetFrameworks.Identity)' == '$(FullFrameworkTFM)' and '$(CreateTlb)' == 'true'" />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Data.Entity.targets" TargetFramework="%(_TargetFrameworks.Identity)" Condition=" '%(_TargetFrameworks.Identity)' == '$(FullFrameworkTFM)' " />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.ServiceModel.targets" TargetFramework="%(_TargetFrameworks.Identity)" Condition=" '%(_TargetFrameworks.Identity)' == '$(FullFrameworkTFM)' " />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.WinFx.targets" TargetFramework="%(_TargetFrameworks.Identity)" Condition=" '%(_TargetFrameworks.Identity)' == '$(FullFrameworkTFM)' " />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.WorkflowBuildExtensions.targets" TargetFramework="%(_TargetFrameworks.Identity)" Condition=" '%(_TargetFrameworks.Identity)' == '$(FullFrameworkTFM)' " />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Xaml.targets" TargetFramework="%(_TargetFrameworks.Identity)" Condition=" '%(_TargetFrameworks.Identity)' == '$(FullFrameworkTFM)' " />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Workflow.Targets" TargetFramework="%(_TargetFrameworks.Identity)" Condition=" '%(_TargetFrameworks.Identity)' == '$(FullFrameworkTFM)' " />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Workflow.VisualBasic.Targets" TargetFramework="%(_TargetFrameworks.Identity)" Condition=" '%(_TargetFrameworks.Identity)' == '$(FullFrameworkTFM)' " />
    </ItemGroup>
 
    <ItemGroup>
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Common.CrossTargeting.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Common.CurrentVersion.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Common.overridetasks" TargetFramework="%(_TargetFrameworks.Identity)" />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Common.props" TargetFramework="%(_TargetFrameworks.Identity)" Subdirectory="Current\" />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Common.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Common.tasks" TargetFramework="%(_TargetFrameworks.Identity)" />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Common.Test.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Managed.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Managed.Before.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Managed.After.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.CSharp.CrossTargeting.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.CSharp.CurrentVersion.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.CSharp.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.NET.props" TargetFramework="%(_TargetFrameworks.Identity)" />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.NETFramework.CurrentVersion.props" TargetFramework="%(_TargetFrameworks.Identity)" />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.NETFramework.CurrentVersion.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.NETFramework.props" TargetFramework="%(_TargetFrameworks.Identity)" />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.NETFramework.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.VisualBasic.CrossTargeting.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.VisualBasic.CurrentVersion.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.VisualBasic.targets" TargetFramework="%(_TargetFrameworks.Identity)" />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.VisualStudioVersion.v11.Common.props" TargetFramework="%(_TargetFrameworks.Identity)" />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.VisualStudioVersion.v12.Common.props" TargetFramework="%(_TargetFrameworks.Identity)" />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.VisualStudioVersion.v14.Common.props" TargetFramework="%(_TargetFrameworks.Identity)" />
      <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\ref\**" TargetFramework="%(_TargetFrameworks.Identity)" Subdirectory="ref\" />
    </ItemGroup>
 
    <ItemGroup>
      <_PackageFiles Include="@(_OurFiles)" BuildAction="Content" PackageCopyToOutput="true" PackageFlatten="false" PackagePath="contentFiles\any\%(_OurFiles.TargetFramework)\%(_OurFiles.Subdirectory)%(RecursiveDir)%(Filename)%(Extension)" />
 
      <!-- Always include the 'standalone' NuGetSdkResolver manifest in our Runtime NuGet package. -->
      <_PackageFiles Include="SdkResolvers\Standalone\Microsoft.Build.NuGetSdkResolver.xml" BuildAction="Content" PackageCopyToOutput="true" PackageFlatten="false" PackagePath="contentFiles\any\%(_BuildOutputInPackage.TargetFramework)\SdkResolvers\Microsoft.Build.NuGetSdkResolver\Microsoft.Build.NuGetSdkResolver.xml" />
 
      <!--
        The items in @(_BuildOutputInPackage) are passed to the Pack task as a separate parameter that does not accept metadata like BuildAction.  So we either
        need to replicate the target that gets build output or just copy the items to _PackageFiles ourselves while setting the metadata.
      -->
      <_PackageFiles Include="@(_BuildOutputInPackage)" BuildAction="Content" PackageCopyToOutput="true" PackageFlatten="false" PackagePath="contentFiles\any\%(_BuildOutputInPackage.TargetFramework)\%(RecursiveDir)%(Filename)%(Extension)" />
 
      <!--
        The build output was copied to _PackageFiles and must be cleared or we'll get package analysis warnings about duplicate files
      -->
      <_BuildOutputInPackage Remove="@(_BuildOutputInPackage)" />
 
      <!--
        Clear _TargetPathsToSymbols so that pdbs don't end up in the package
      -->
      <_TargetPathsToSymbols Remove="@(_TargetPathsToSymbols)" />
    </ItemGroup>
 
  </Target>
 
  <!-- Note: Keep the `AssemblyFile=` usage here instead of using `AssemblyName`. It acts as a regression test for folks who have been using it this way,
             which has been in the official docs for some time. -->
  <UsingTask TaskName="ValidateMSBuildPackageDependencyVersions" TaskFactory="RoslynCodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
    <Task>
      <Code Source="ValidateMSBuildPackageDependencyVersions.cs" Language="cs" />
    </Task>
  </UsingTask>
 
  <Target Name="ValidateMSBuildPackageDependencyVersions" BeforeTargets="AfterBuild" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
    <ValidateMSBuildPackageDependencyVersions AppConfig="@(AppConfigWithTargetPath)" AssemblyPath="$(OutputPath)" />
  </Target>
 
</Project>