File: Microsoft.Build.Framework.csproj
Web Access
Project: ..\..\..\src\Framework\Microsoft.Build.Framework.csproj (Microsoft.Build.Framework)
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFrameworks>$(LibraryTargetFrameworks)</TargetFrameworks>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <GenerateReferenceAssemblySource>true</GenerateReferenceAssemblySource>
    <!-- Do not create Tlbs when building in source-build mode (no net472 TFM available).
         In VMR Windows builds and VS builds, generate the .tlb from the net472 output. -->
    <CreateTlb Condition="'$(DotNetBuildSourceOnly)' != 'true' and $([MSBuild]::IsOSPlatform('windows'))">true</CreateTlb>
    <IsPackable>true</IsPackable>
    <PackageDescription>This package contains the $(MSBuildProjectName) assembly which is a common assembly used by other MSBuild assemblies.</PackageDescription>
    <IncludeSatelliteOutputInPack>false</IncludeSatelliteOutputInPack>
    <ApplyNgenOptimization Condition="'$(TargetFramework)' == '$(FullFrameworkTFM)'">full</ApplyNgenOptimization>
    <EnablePackageValidation>true</EnablePackageValidation>
    <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
    <GenerateResxSource>true</GenerateResxSource>
    <GenerateResxSourceEmitFormatMethods>true</GenerateResxSourceEmitFormatMethods>
  </PropertyGroup>
 
  <!-- The .tlb is generated by CreateTypeLib target during the net472 build.
       Place it under tools/ in the NuGet package so it doesn't appear as a library reference. -->
  <Target Name="IncludeTlbInPackage" BeforeTargets="_GetPackageFiles" Condition="'$(CreateTlb)' == 'true'">
    <ItemGroup>
      <_PackageFiles Include="$(ArtifactsBinDir)Microsoft.Build.Framework\$(Configuration)\net472\Microsoft.Build.Framework.tlb"
                     PackagePath="tools/net472" />
    </ItemGroup>
  </Target>
 
  <ItemGroup>
    <PackageReference Include="Microsoft.CodeAnalysis.Contracts" PrivateAssets="all" />
 
    <!-- Display files included by the Microsoft.CodeAnalysis.Contracts source package in a 'SourcePackages\Contracts' folder -->
    <Content Update="@(Content)">
      <Link Condition="'%(NuGetPackageId)' == 'Microsoft.CodeAnalysis.Contracts'">SourcePackages\Contracts\%(Link)</Link>
    </Content>
    <Compile Update="@(Compile)">
      <Link Condition="'%(NuGetPackageId)' == 'Microsoft.CodeAnalysis.Contracts'">SourcePackages\Contracts\%(Link)</Link>
    </Compile>
  </ItemGroup>
 
  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
    <!-- Promote CompilerServices.Unsafe from the old version we get from System.Memory on net472. -->
    <PackageReference Include="System.Runtime.CompilerServices.Unsafe" />
    <PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" PrivateAssets="all" />
    <Reference Include="System.Xaml" />
    <PackageReference Include="System.Text.Json" />
    <!-- Telemetry in Visual Studio scenarios -->
    <PackageReference Include="Microsoft.VisualStudio.Telemetry" PrivateAssets="all" />
  </ItemGroup>
 
  <!-- Framework and standard don't have these. -->
  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' OR '$(TargetFrameworkIdentifier)' == '.NETStandard'">
    <PackageReference Include="System.Collections.Immutable" />
  </ItemGroup>
 
  <!-- When targeting NS2.0, make private all references not exposed in the public API. -->
  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'">
    <PackageReference Include="System.Diagnostics.DiagnosticSource" PrivateAssets="all" />
    <PackageReference Update="System.Collections.Immutable" PrivateAssets="all" />
  </ItemGroup>
 
  <ItemGroup>
    <Compile Include="..\GlobalUsings.cs" Link="GlobalUsings.cs" />
  </ItemGroup>
 
  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'">
    <Compile Remove="XamlTypes\**" />
    <EmbeddedResource Remove="XamlTypes\**" />
    <None Remove="XamlTypes\**" />
  </ItemGroup>
 
  <ItemGroup>
    <ProjectReference Include="..\StringTools\StringTools.csproj" />
  </ItemGroup>
 
  <ItemGroup>
    <RCResourceFile Include="native.rc" />
  </ItemGroup>
 
  <ItemGroup>
    <EmbeddedResource Update="Resources\SR.resx">
      <GenerateSource>true</GenerateSource>
    </EmbeddedResource>
 
    <Using Include="$(RootNamespace).Resources" />
  </ItemGroup>
</Project>