-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
dotnet/msbuild
#9583Labels
Description
This PR added the support for the /t:Test
target to msbuild dotnet/msbuild#9193 and the target it's imported using the prop UseMSBuildTestInfrastructure
Now that's landed inside the .NET SDK I'm trying to use it and it's working as expected for single tfm.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
dotnet msbuild /t:Test -p:UseMSBuildTestInfrastructure=true
MSBuild version 17.10.0-preview-23615-03+abc2f4620 for .NET
But it's failing for multi-tm
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
dotnet msbuild /t:Test -p:UseMSBuildTestInfrastructure=true /bl
...\msbuildtest.csproj : error MSB4057: The target "Test" does not exist in the project.
Digging deeper into it I've noticed that the Microsoft.Common.Test.targets
is imported only in case of single tfm
Evangelink