From 8e4df4651d64dfdad6a5457bae9029dc80751e92 Mon Sep 17 00:00:00 2001 From: Marco Rossignoli Date: Mon, 4 Dec 2023 11:52:24 +0100 Subject: [PATCH] Add experimental `MSBuild` sdk project (#1864) --- .gitignore | 5 +++ TestFx.sln | 10 +++++- eng/Version.Details.xml | 4 +++ eng/Versions.props | 3 ++ eng/verify-nupkgs.ps1 | 1 + src/Package/MSTest.Sdk/MSTest.Sdk.csproj | 45 ++++++++++++++++++++++++ src/Package/MSTest.Sdk/MSTest.Sdk.nuspec | 10 ++++++ src/Package/MSTest.Sdk/Sdk/Sdk.props | 18 ++++++++++ src/Package/MSTest.Sdk/Sdk/Sdk.targets | 40 +++++++++++++++++++++ 9 files changed, 135 insertions(+), 1 deletion(-) create mode 100644 src/Package/MSTest.Sdk/MSTest.Sdk.csproj create mode 100644 src/Package/MSTest.Sdk/MSTest.Sdk.nuspec create mode 100644 src/Package/MSTest.Sdk/Sdk/Sdk.props create mode 100644 src/Package/MSTest.Sdk/Sdk/Sdk.targets diff --git a/.gitignore b/.gitignore index b6ddbcb2c7..2dab8623ff 100644 --- a/.gitignore +++ b/.gitignore @@ -133,3 +133,8 @@ project.fragment.lock.json .dotnet/ .packages/ .tools/ + +# =========================== +# Update template files +# =========================== +/src/Package/MSTest.Sdk/Sdk/Sdk.props \ No newline at end of file diff --git a/TestFx.sln b/TestFx.sln index 14ab19b06e..1e348ef8b6 100644 --- a/TestFx.sln +++ b/TestFx.sln @@ -45,6 +45,7 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{929A3EDE-893B-4801-82BA-01FD947291CB}" ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig + .gitignore = .gitignore Directory.Build.Local.props = Directory.Build.Local.props Directory.Build.Local.targets = Directory.Build.Local.targets Directory.Build.props = Directory.Build.props @@ -162,8 +163,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MSTest.Internal.TestFx.Docu EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestingPlatformRunner", "TestingPlatformRunner", "{A9F9C49E-3CDA-4207-AA53-CC80AF1798FE}" ProjectSection(SolutionItems) = preProject - eng\TestingPlatformRunner\TestingPlatformRunner.targets = eng\TestingPlatformRunner\TestingPlatformRunner.targets eng\TestingPlatformRunner\TestingPlatform.Runner.targets = eng\TestingPlatformRunner\TestingPlatform.Runner.targets + eng\TestingPlatformRunner\TestingPlatformRunner.targets = eng\TestingPlatformRunner\TestingPlatformRunner.targets EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "1 - Runner", "1 - Runner", "{6AEE1440-FDF0-4729-8196-B24D0E333550}" @@ -172,6 +173,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Testing.Platform" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Testing.Platform.UnitTests", "test\UnitTests\Microsoft.Testing.Platform.UnitTests\Microsoft.Testing.Platform.UnitTests.csproj", "{0F1BB08E-BB6C-43E0-A7DF-1D6A03DA5DC7}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MSTest.Sdk", "src\Package\MSTest.Sdk\MSTest.Sdk.csproj", "{10930CFD-EDF9-4486-B0A3-49230B5A6798}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -354,6 +357,10 @@ Global {0F1BB08E-BB6C-43E0-A7DF-1D6A03DA5DC7}.Debug|Any CPU.Build.0 = Debug|Any CPU {0F1BB08E-BB6C-43E0-A7DF-1D6A03DA5DC7}.Release|Any CPU.ActiveCfg = Release|Any CPU {0F1BB08E-BB6C-43E0-A7DF-1D6A03DA5DC7}.Release|Any CPU.Build.0 = Release|Any CPU + {10930CFD-EDF9-4486-B0A3-49230B5A6798}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {10930CFD-EDF9-4486-B0A3-49230B5A6798}.Debug|Any CPU.Build.0 = Debug|Any CPU + {10930CFD-EDF9-4486-B0A3-49230B5A6798}.Release|Any CPU.ActiveCfg = Release|Any CPU + {10930CFD-EDF9-4486-B0A3-49230B5A6798}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -417,6 +424,7 @@ Global {6AEE1440-FDF0-4729-8196-B24D0E333550} = {FF8B1B72-55A1-4FFE-809E-7B79323ED8D0} {48FAB979-8DA5-492E-8B3F-5DBBE82F659A} = {6AEE1440-FDF0-4729-8196-B24D0E333550} {0F1BB08E-BB6C-43E0-A7DF-1D6A03DA5DC7} = {BB874DF1-44FE-415A-B634-A6B829107890} + {10930CFD-EDF9-4486-B0A3-49230B5A6798} = {E374A3A6-C364-4890-B315-D60F5C682B6E} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {31E0F4D5-975A-41CC-933E-545B2201FAF9} diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 99a3a1bdc7..81fbcbbd21 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -13,5 +13,9 @@ https://github.com/microsoft/testanywhere 43bcc485747b0f15894cc7b6bcd0551af58ad21c + + https://github.com/dotnet/arcade + 3d92d0bfd8c9006f5fe1687e465dc4f8aa068b00 + diff --git a/eng/Versions.props b/eng/Versions.props index d723b1c16c..f6f6c0c8a1 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -24,6 +24,9 @@ 13.0.3 3.3.4 $(MicrosoftCodeAnalysisPublicApiAnalyzersVersion) + + 8.0.0-beta.23428.2 + 3.2.0-preview.23601.5 17.7.30 0.2.5 1.2.0-beta.507 diff --git a/eng/verify-nupkgs.ps1 b/eng/verify-nupkgs.ps1 index 9ab3229aaa..3f39fbf936 100644 --- a/eng/verify-nupkgs.ps1 +++ b/eng/verify-nupkgs.ps1 @@ -19,6 +19,7 @@ function Unzip { function Confirm-NugetPackages { Write-Verbose "Starting Confirm-NugetPackages." $expectedNumOfFiles = @{ + "MSTest.Sdk" = 7; "MSTest.Internal.TestFx.Documentation" = 10; "MSTest.TestFramework" = 94; "MSTest.TestAdapter" = 154; diff --git a/src/Package/MSTest.Sdk/MSTest.Sdk.csproj b/src/Package/MSTest.Sdk/MSTest.Sdk.csproj new file mode 100644 index 0000000000..029dcae988 --- /dev/null +++ b/src/Package/MSTest.Sdk/MSTest.Sdk.csproj @@ -0,0 +1,45 @@ + + + + netstandard2.0 + + + + true + false + MSTest.Sdk + MSTest.Sdk.nuspec + $(OutputPath) + MSTest TestFramework TestAdapter VisualStudio Unittest MSTestV2 Microsoft + + MSTest is Microsoft supported Test Framework. + + This package contains the MSTest MSBuild project SDK. + + + $(NoWarn);NU5128 + + + + + PreserveNewest + + + + + + + + + <_TemplateProperties>MSTestVersion=$(MSTestVersion);MicrosoftTestingPlatformVersion=$(MicrosoftTestingPlatformVersion);MicrosoftNETTestSdkVersion=$(MicrosoftNETTestSdkVersion) + + + + <_TemplateCsproj Include="$(MSBuildProjectDirectory)/Sdk/Sdk.props" Destination="$(MSBuildProjectDirectory)/Sdk/Sdk.props" /> + + + + + + diff --git a/src/Package/MSTest.Sdk/MSTest.Sdk.nuspec b/src/Package/MSTest.Sdk/MSTest.Sdk.nuspec new file mode 100644 index 0000000000..9749ea3b5a --- /dev/null +++ b/src/Package/MSTest.Sdk/MSTest.Sdk.nuspec @@ -0,0 +1,10 @@ + + + + $CommonMetadataElements$ + + + $CommonFileElements$ + + + diff --git a/src/Package/MSTest.Sdk/Sdk/Sdk.props b/src/Package/MSTest.Sdk/Sdk/Sdk.props new file mode 100644 index 0000000000..412fb5e4f1 --- /dev/null +++ b/src/Package/MSTest.Sdk/Sdk/Sdk.props @@ -0,0 +1,18 @@ + + + + + + + true + false + false + + + + + + + + + diff --git a/src/Package/MSTest.Sdk/Sdk/Sdk.targets b/src/Package/MSTest.Sdk/Sdk/Sdk.targets new file mode 100644 index 0000000000..5eed2c6c21 --- /dev/null +++ b/src/Package/MSTest.Sdk/Sdk/Sdk.targets @@ -0,0 +1,40 @@ + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + +