|
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(RepoRoot)eng\BootStrapMsBuild.props" />
<PropertyGroup>
<TargetFrameworks>$(RuntimeOutputTargetFrameworks)</TargetFrameworks>
<!-- Don't warn on incompatability MSIL vs x86 since this isn't an actual working DLL -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
<DeterministicSourcePaths>false</DeterministicSourcePaths>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\MSBuild\MSBuild.csproj" />
<!-- Direct project references needed here to avoid NuGet version conflict errors -->
<ProjectReference Include="..\Framework\Microsoft.Build.Framework.csproj" />
<ProjectReference Include="..\Tasks\Microsoft.Build.Tasks.csproj" />
<ProjectReference Include="..\Utilities\Microsoft.Build.Utilities.csproj" />
</ItemGroup>
<ItemGroup>
<!-- This file is needed so the dotnet CLI knows how to map preview SDK versions to tfms (because tfms do not have preview information on them) -->
<!-- This is because according to semver, 2.1.0-preview is not >= 2.1.0 -->
<Content Include="$(DotNetRoot)sdk\$(DotNetCliVersion)\Microsoft.NETCoreSdk.BundledVersions.props" CopyToOutputDirectory="PreserveNewest" />
<!-- Include NuGet build tasks -->
<PackageReference Include="NuGet.Build.Tasks" />
<PackageReference Include="NuGet.Build.Tasks.Console" />
<PackageReference Include="Microsoft.Build.NuGetSdkResolver" />
<!-- As of 17.5, NuGet.Build.Tasks and Microsoft.Build.NuGetSdkResolver depends on Newtonsoft.Json version 13.0.1,
causing it to be downloaded and flagged by component governance -->
<PackageReference Include="Newtonsoft.Json" />
<!-- Add this explicitly since it's marked as Private in MSBuild.csproj, but we need these at runtime to be like VS. -->
<PackageReference Include="Microsoft.BuildXL.Processes" Condition="'$(FeatureReportFileAccesses)' == 'true'" PrivateAssets="all" />
</ItemGroup>
<!-- Use deps file from this project with additional dependencies listed instead of the one generated in the MSBuild project -->
<Target Name="UpdateMSBuildDepsFile" AfterTargets="Build" Condition="($([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'netcoreapp2.1')) or '$(TargetFramework)' == 'netstandard2.0')">
<Copy SourceFiles="$(OutputPath)$(AssemblyName).deps.json" DestinationFiles="$(OutputPath)MSBuild.deps.json" SkipUnchangedFiles="true" />
</Target>
<Target Name="UpdatePublishedMSBuildDepsFile" AfterTargets="Publish" Condition="'$(TargetFramework)' == '$(LatestDotNetCoreForMSBuild)'">
<Copy SourceFiles="$(PublishDir)$(AssemblyName).deps.json" DestinationFiles="$(PublishDir)MSBuild.deps.json" SkipUnchangedFiles="true" />
</Target>
<Import Project="..\Package\GetBinPaths.targets" Condition="$(TargetFramework.StartsWith('net4'))" />
<Import Project="..\Package\GetBinPaths.Arm64.targets" Condition="$(TargetFramework.StartsWith('net4'))" />
<Import Project="$(RepoRoot)eng\BootStrapMsBuild.targets" />
</Project> |