|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutDirName>Tests\$(MSBuildProjectName)</OutDirName>
</PropertyGroup>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<TargetFrameworks>$(ResolverTargetFramework);net472</TargetFrameworks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<StrongNameKeyId>MicrosoftAspNetCore</StrongNameKeyId>
<SignAssembly>true</SignAssembly>
<PublicSign Condition=" '$([MSBuild]::IsOSPlatform(`Windows`))' == 'false' ">true</PublicSign>
<IsPackable>true</IsPackable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<!-- Avoid https://github.com/dotnet/arcade/issues/9305 -->
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Update="**\*.resx" GenerateSource="true" />
</ItemGroup>
<!-- Versions that have to be pinned because they are locked to VS/MSBuild compatibility -->
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<PackageReference Include="System.Collections.Immutable" VersionOverride="$(SystemCollectionsImmutableToolsetPackageVersion)" />
</ItemGroup>
<Target Name="VerifyMSBuildDependency" BeforeTargets="ResolveAssemblyReferences" Condition="'$([MSBuild]::GetTargetFrameworkIdentifier($(TargetFramework)))' == '.NETCoreApp'">
<!-- We explicitly reference an older version of MSBuild here to support VS
for Mac and other VS scenarios. During source-build, we only have access to
the latest version, which targets NetCurrent. -->
<PropertyGroup>
<MSBuildPathInPackage>$(PkgMicrosoft_Build_Runtime)\contentFiles\any\net10.0\MSBuild.dll</MSBuildPathInPackage>
<MSBuildPathInPackage Condition="'$(DotNetBuildSourceOnly)' == 'true' and !Exists($(MSBuildPathInPackage))">$(PkgMicrosoft_Build_Runtime)\contentFiles\any\$(NetCurrent)\MSBuild.dll</MSBuildPathInPackage>
</PropertyGroup>
<Error Condition="!Exists('$(MSBuildPathInPackage)')" Text="Something moved around in Microsoft.Build.Runtime, adjust code here accordingly." />
<ItemGroup>
<Reference Include="$(MSBuildPathInPackage)" />
</ItemGroup>
</Target>
<ItemGroup>
<PackageReference Include="Microsoft.Build.Runtime"
ExcludeAssets="all"
Condition="'$([MSBuild]::GetTargetFrameworkIdentifier($(TargetFramework)))' == '.NETCoreApp'"
GeneratePathProperty="true" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" />
<PackageReference Include="NuGet.Versioning" />
<PackageReference Include="NuGet.Packaging" />
<PackageReference Include="NuGet.Frameworks" />
<PackageReference Include="NuGet.ProjectModel" />
<PackageReference Include="Microsoft.Build" ExcludeAssets="runtime" PrivateAssets="all" />
<PackageReference Include="Microsoft.Build.Utilities.Core" ExcludeAssets="runtime" PrivateAssets="all" />
<PackageReference Include="System.CommandLine" />
<PackageReference Include="System.IO.Hashing" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<PackageReference Include="System.Diagnostics.DiagnosticSource" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>
|