Skip to content

Commit

Permalink
Simplify adapter props and targets (#4397)
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangelink authored Dec 20, 2024
1 parent 1ec111d commit 7b519c8
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 151 deletions.
2 changes: 1 addition & 1 deletion eng/verify-nupkgs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function Confirm-NugetPackages {
"MSTest.Sdk" = 15;
"MSTest.Internal.TestFx.Documentation" = 10;
"MSTest.TestFramework" = 148;
"MSTest.TestAdapter" = 82;
"MSTest.TestAdapter" = 74;
"MSTest" = 6;
"MSTest.Analyzers" = 10;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,48 +36,42 @@

<!-- netstandard2.0 -->
<file src="netstandard2.0\build\common\MSTest.TestAdapter.props" target="build\netstandard2.0\" />
<file src="netstandard2.0\build\netfx-netcore-netstandard\MSTest.TestAdapter.targets" target="build\netstandard2.0\" />
<file src="netstandard2.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" target="build\netstandard2.0\" />
<file src="netstandard2.0\build\common\MSTest.TestAdapter.targets" target="build\netstandard2.0\" />
<file src="netstandard2.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" target="build\netstandard2.0\" />
<file src="netstandard2.0\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll" target="build\netstandard2.0\" />
<file src="netstandard2.0\Microsoft.TestPlatform.AdapterUtilities.dll" target="build\netstandard2.0\" />

<!-- netcoreapp3.1 -->
<file src="netcoreapp3.1\build\common\MSTest.TestAdapter.props" target="build\netcoreapp3.1\" />
<file src="netcoreapp3.1\build\netfx-netcore-netstandard\MSTest.TestAdapter.targets" target="build\netcoreapp3.1\" />
<file src="netcoreapp3.1\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" target="build\netcoreapp3.1\" />
<file src="netcoreapp3.1\build\common\MSTest.TestAdapter.targets" target="build\netcoreapp3.1\" />
<file src="netcoreapp3.1\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" target="build\netcoreapp3.1\" />
<file src="netcoreapp3.1\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll" target="build\netcoreapp3.1\" />
<file src="netcoreapp3.1\Microsoft.TestPlatform.AdapterUtilities.dll" target="build\netcoreapp3.1\" />

<!-- net6.0 -->
<file src="net6.0\build\common\MSTest.TestAdapter.props" target="build\net6.0\MSTest.TestAdapter.props" />
<file src="net6.0\build\net\MSTest.TestAdapter.targets" target="build\net6.0\MSTest.TestAdapter.targets" />
<file src="net6.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" target="build\net6.0\" />
<file src="net6.0\build\common\MSTest.TestAdapter.targets" target="build\net6.0\MSTest.TestAdapter.targets" />
<file src="net6.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" target="build\net6.0\" />
<file src="net6.0\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll" target="build\net6.0\" />
<file src="net6.0\Microsoft.TestPlatform.AdapterUtilities.dll" target="build\net6.0\" />

<!-- net7.0 -->
<file src="net7.0\build\common\MSTest.TestAdapter.props" target="build\net7.0\MSTest.TestAdapter.props" />
<file src="net7.0\build\net\MSTest.TestAdapter.targets" target="build\net7.0\MSTest.TestAdapter.targets" />
<file src="net7.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" target="build\net7.0\" />
<file src="net7.0\build\common\MSTest.TestAdapter.targets" target="build\net7.0\MSTest.TestAdapter.targets" />
<file src="net7.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" target="build\net7.0\" />
<file src="net7.0\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll" target="build\net7.0\" />
<file src="net7.0\Microsoft.TestPlatform.AdapterUtilities.dll" target="build\net7.0\" />

<!-- net8.0 -->
<file src="net8.0\build\common\MSTest.TestAdapter.props" target="build\net8.0\MSTest.TestAdapter.props" />
<file src="net8.0\build\net\MSTest.TestAdapter.targets" target="build\net8.0\MSTest.TestAdapter.targets" />
<file src="net8.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" target="build\net8.0\" />
<file src="net8.0\build\common\MSTest.TestAdapter.targets" target="build\net8.0\MSTest.TestAdapter.targets" />
<file src="net8.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" target="build\net8.0\" />
<file src="net8.0\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll" target="build\net8.0\" />
<file src="net8.0\Microsoft.TestPlatform.AdapterUtilities.dll" target="build\net8.0\" />

<!-- net9.0 -->
<file src="net9.0\build\common\MSTest.TestAdapter.props" target="build\net9.0\MSTest.TestAdapter.props" />
<file src="net9.0\build\net\MSTest.TestAdapter.targets" target="build\net9.0\MSTest.TestAdapter.targets" />
<file src="net9.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" target="build\net9.0\" />
<file src="net9.0\build\common\MSTest.TestAdapter.targets" target="build\net9.0\MSTest.TestAdapter.targets" />
<file src="net9.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" target="build\net9.0\" />
<file src="net9.0\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll" target="build\net9.0\" />
<file src="net9.0\Microsoft.TestPlatform.AdapterUtilities.dll" target="build\net9.0\" />
Expand Down
2 changes: 1 addition & 1 deletion src/Adapter/MSTest.TestAdapter/MSTest.TestAdapter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
<None Update="build\uwp\MSTest.TestAdapter.targets" Condition=" '$(TargetFramework)' == '$(UwpMinimum)' ">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="build\net\MSTest.TestAdapter.targets">
<None Update="build\common\MSTest.TestAdapter.targets">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="PACKAGE.md">
Expand Down
22 changes: 7 additions & 15 deletions src/Adapter/MSTest.TestAdapter/MSTest.TestAdapter.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -44,32 +44,28 @@

<!-- netstandard2.0 -->
<file src="netstandard2.0\build\common\MSTest.TestAdapter.props" target="build\netstandard2.0\" />
<file src="netstandard2.0\build\netfx-netcore-netstandard\MSTest.TestAdapter.targets" target="build\netstandard2.0\" />
<file src="netstandard2.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" target="build\netstandard2.0\" />
<file src="netstandard2.0\build\common\MSTest.TestAdapter.targets" target="build\netstandard2.0\" />
<file src="netstandard2.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" target="build\netstandard2.0\" />
<file src="netstandard2.0\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll" target="build\netstandard2.0\" />
<file src="netstandard2.0\Microsoft.TestPlatform.AdapterUtilities.dll" target="build\netstandard2.0\" />

<!-- uap10.0 -->
<file src="uap10.0.16299\build\uwp\MSTest.TestAdapter.props" target="build\uap10.0\MSTest.TestAdapter.props" />
<file src="uap10.0.16299\build\uwp\MSTest.TestAdapter.targets" target="build\uap10.0\MSTest.TestAdapter.targets" />
<file src="uap10.0.16299\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" target="build\uap10.0\" />
<file src="$ArtifactsBinDir$MSTestAdapter.PlatformServices\$Configuration$\uap10.0.16299\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" target="build\uap10.0\" />
<file src="uap10.0.16299\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll" target="build\uap10.0\" />
<file src="uap10.0.16299\Microsoft.TestPlatform.AdapterUtilities.dll" target="build\uap10.0\" />

<!-- netcoreapp3.1 -->
<file src="netcoreapp3.1\build\common\MSTest.TestAdapter.props" target="build\netcoreapp3.1\" />
<file src="netcoreapp3.1\build\netfx-netcore-netstandard\MSTest.TestAdapter.targets" target="build\netcoreapp3.1\" />
<file src="netcoreapp3.1\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" target="build\netcoreapp3.1\" />
<file src="netcoreapp3.1\build\common\MSTest.TestAdapter.targets" target="build\netcoreapp3.1\" />
<file src="netcoreapp3.1\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" target="build\netcoreapp3.1\" />
<file src="netcoreapp3.1\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll" target="build\netcoreapp3.1\" />
<file src="netcoreapp3.1\Microsoft.TestPlatform.AdapterUtilities.dll" target="build\netcoreapp3.1\" />

<!-- net6.0 -->
<file src="net6.0\build\common\MSTest.TestAdapter.props" target="build\net6.0\MSTest.TestAdapter.props" />
<file src="net6.0\build\net\MSTest.TestAdapter.targets" target="build\net6.0\MSTest.TestAdapter.targets" />
<file src="net6.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" target="build\net6.0\" />
<file src="net6.0\build\common\MSTest.TestAdapter.targets" target="build\net6.0\MSTest.TestAdapter.targets" />
<file src="net6.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" target="build\net6.0\" />
<file src="$ArtifactsBinDir$MSTestAdapter.PlatformServices\$Configuration$\net6.0-windows10.0.18362.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" target="build\net6.0\winui\" />
<file src="net6.0\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll" target="build\net6.0\" />
Expand All @@ -78,32 +74,28 @@

<!-- net7.0 -->
<file src="net7.0\build\common\MSTest.TestAdapter.props" target="build\net7.0\MSTest.TestAdapter.props" />
<file src="net7.0\build\net\MSTest.TestAdapter.targets" target="build\net7.0\MSTest.TestAdapter.targets" />
<file src="net7.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" target="build\net7.0\" />
<file src="net7.0\build\common\MSTest.TestAdapter.targets" target="build\net7.0\MSTest.TestAdapter.targets" />
<file src="net7.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" target="build\net7.0\" />
<file src="net7.0\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll" target="build\net7.0\" />
<file src="net7.0\Microsoft.TestPlatform.AdapterUtilities.dll" target="build\net7.0\" />

<!-- net8.0 -->
<file src="net8.0\build\common\MSTest.TestAdapter.props" target="build\net8.0\MSTest.TestAdapter.props" />
<file src="net8.0\build\net\MSTest.TestAdapter.targets" target="build\net8.0\MSTest.TestAdapter.targets" />
<file src="net8.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" target="build\net8.0\" />
<file src="net8.0\build\common\MSTest.TestAdapter.targets" target="build\net8.0\MSTest.TestAdapter.targets" />
<file src="net8.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" target="build\net8.0\" />
<file src="net8.0\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll" target="build\net8.0\" />
<file src="net8.0\Microsoft.TestPlatform.AdapterUtilities.dll" target="build\net8.0\" />

<!-- net9.0 -->
<file src="net9.0\build\common\MSTest.TestAdapter.props" target="build\net9.0\MSTest.TestAdapter.props" />
<file src="net9.0\build\net\MSTest.TestAdapter.targets" target="build\net9.0\MSTest.TestAdapter.targets" />
<file src="net9.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" target="build\net9.0\" />
<file src="net9.0\build\common\MSTest.TestAdapter.targets" target="build\net9.0\MSTest.TestAdapter.targets" />
<file src="net9.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" target="build\net9.0\" />
<file src="net9.0\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll" target="build\net9.0\" />
<file src="net9.0\Microsoft.TestPlatform.AdapterUtilities.dll" target="build\net9.0\" />

<!-- net462 -->
<file src="net462\build\common\MSTest.TestAdapter.props" target="build\net462\" />
<file src="net462\build\netfx-netcore-netstandard\MSTest.TestAdapter.targets" target="build\net462\" />
<file src="net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" target="build\net462\" />
<file src="net462\build\common\MSTest.TestAdapter.targets" target="build\net462\" />
<file src="net462\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" target="build\net462\" />
<file src="net462\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll" target="build\net462\" />
<file src="net462\Microsoft.TestPlatform.AdapterUtilities.dll" target="build\net462\" />
Expand Down

This file was deleted.

29 changes: 3 additions & 26 deletions src/Adapter/MSTest.TestAdapter/build/uwp/MSTest.TestAdapter.props
Original file line number Diff line number Diff line change
@@ -1,30 +1,7 @@
<Project>

<ItemGroup>
<TestAdapterContent Include="$(MSBuildThisFileDirectory)Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll">
<Link>Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</TestAdapterContent>
<TestAdapterContent Include="$(MSBuildThisFileDirectory)Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll">
<Link>Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</TestAdapterContent>
<TestAdapterContent Include="$(MSBuildThisFileDirectory)Microsoft.TestPlatform.AdapterUtilities.dll">
<Link>Microsoft.TestPlatform.AdapterUtilities.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</TestAdapterContent>
</ItemGroup>

<ItemGroup>
<!--
Including `@(TestAdapterContent)` in the `None` ItemGroup to get the `CopyToOutputDirectory` behavior be default,
package consumers can opt-out of this behavior by removing `@(TestAdapterContent)` from the `None` ItemGroup
(i.e. `<None Remove="@(TestAdapterContent)" />`)
-->
<None Include="@(TestAdapterContent)" />
</ItemGroup>
<PropertyGroup>
<EnableMSTestV2CopyResources Condition=" '$(EnableMSTestV2CopyResources)' == '' ">true</EnableMSTestV2CopyResources>
</PropertyGroup>

</Project>
Loading

0 comments on commit 7b519c8

Please sign in to comment.