From c748ee1f24b80aed7060176c273b810582e831ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Mon, 8 Apr 2024 12:15:54 +0200 Subject: [PATCH] Add project samples for MSTest.Sdk (#2675) --- samples/DemoMSTestSdk/DemoMSTestSdk.sln | 37 +++++++++++++++++ samples/DemoMSTestSdk/Directory.Build.props | 2 + samples/DemoMSTestSdk/Directory.Build.targets | 2 + samples/DemoMSTestSdk/NuGet.config | 12 ++++++ .../ProjectUsingMSTestRunner.csproj | 39 ++++++++++++++++++ .../ProjectUsingMSTestRunner/UnitTest1.cs | 13 ++++++ .../ProjectUsingMSTestRunner/Usings.cs | 4 ++ .../ProjectUsingVSTest.csproj | 33 +++++++++++++++ .../ProjectUsingVSTest/UnitTest1.cs | 13 ++++++ .../ProjectUsingVSTest/Usings.cs | 4 ++ .../ProjectWithNativeAOT.csproj | 41 +++++++++++++++++++ .../ProjectWithNativeAOT/UnitTest1.cs | 13 ++++++ .../ProjectWithNativeAOT/Usings.cs | 4 ++ 13 files changed, 217 insertions(+) create mode 100644 samples/DemoMSTestSdk/DemoMSTestSdk.sln create mode 100644 samples/DemoMSTestSdk/Directory.Build.props create mode 100644 samples/DemoMSTestSdk/Directory.Build.targets create mode 100644 samples/DemoMSTestSdk/NuGet.config create mode 100644 samples/DemoMSTestSdk/ProjectUsingMSTestRunner/ProjectUsingMSTestRunner.csproj create mode 100644 samples/DemoMSTestSdk/ProjectUsingMSTestRunner/UnitTest1.cs create mode 100644 samples/DemoMSTestSdk/ProjectUsingMSTestRunner/Usings.cs create mode 100644 samples/DemoMSTestSdk/ProjectUsingVSTest/ProjectUsingVSTest.csproj create mode 100644 samples/DemoMSTestSdk/ProjectUsingVSTest/UnitTest1.cs create mode 100644 samples/DemoMSTestSdk/ProjectUsingVSTest/Usings.cs create mode 100644 samples/DemoMSTestSdk/ProjectWithNativeAOT/ProjectWithNativeAOT.csproj create mode 100644 samples/DemoMSTestSdk/ProjectWithNativeAOT/UnitTest1.cs create mode 100644 samples/DemoMSTestSdk/ProjectWithNativeAOT/Usings.cs diff --git a/samples/DemoMSTestSdk/DemoMSTestSdk.sln b/samples/DemoMSTestSdk/DemoMSTestSdk.sln new file mode 100644 index 000000000..7569e194d --- /dev/null +++ b/samples/DemoMSTestSdk/DemoMSTestSdk.sln @@ -0,0 +1,37 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.34807.42 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProjectUsingVSTest", "ProjectUsingVSTest\ProjectUsingVSTest.csproj", "{0360A072-0ED6-4A27-9AE5-3C6DD055733E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProjectUsingMSTestRunner", "ProjectUsingMSTestRunner\ProjectUsingMSTestRunner.csproj", "{8DA3F43B-938F-4A1E-BE58-B7F80386187F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProjectWithNativeAOT", "ProjectWithNativeAOT\ProjectWithNativeAOT.csproj", "{9EA03738-C4AA-4CD7-BF71-BA8E689522D7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0360A072-0ED6-4A27-9AE5-3C6DD055733E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0360A072-0ED6-4A27-9AE5-3C6DD055733E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0360A072-0ED6-4A27-9AE5-3C6DD055733E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0360A072-0ED6-4A27-9AE5-3C6DD055733E}.Release|Any CPU.Build.0 = Release|Any CPU + {8DA3F43B-938F-4A1E-BE58-B7F80386187F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8DA3F43B-938F-4A1E-BE58-B7F80386187F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8DA3F43B-938F-4A1E-BE58-B7F80386187F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8DA3F43B-938F-4A1E-BE58-B7F80386187F}.Release|Any CPU.Build.0 = Release|Any CPU + {9EA03738-C4AA-4CD7-BF71-BA8E689522D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9EA03738-C4AA-4CD7-BF71-BA8E689522D7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9EA03738-C4AA-4CD7-BF71-BA8E689522D7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9EA03738-C4AA-4CD7-BF71-BA8E689522D7}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {04BEDCF3-1E4B-4C1E-8432-2221740A1A14} + EndGlobalSection +EndGlobal diff --git a/samples/DemoMSTestSdk/Directory.Build.props b/samples/DemoMSTestSdk/Directory.Build.props new file mode 100644 index 000000000..8c119d541 --- /dev/null +++ b/samples/DemoMSTestSdk/Directory.Build.props @@ -0,0 +1,2 @@ + + diff --git a/samples/DemoMSTestSdk/Directory.Build.targets b/samples/DemoMSTestSdk/Directory.Build.targets new file mode 100644 index 000000000..8c119d541 --- /dev/null +++ b/samples/DemoMSTestSdk/Directory.Build.targets @@ -0,0 +1,2 @@ + + diff --git a/samples/DemoMSTestSdk/NuGet.config b/samples/DemoMSTestSdk/NuGet.config new file mode 100644 index 000000000..20182a578 --- /dev/null +++ b/samples/DemoMSTestSdk/NuGet.config @@ -0,0 +1,12 @@ + + + + + + + + + diff --git a/samples/DemoMSTestSdk/ProjectUsingMSTestRunner/ProjectUsingMSTestRunner.csproj b/samples/DemoMSTestSdk/ProjectUsingMSTestRunner/ProjectUsingMSTestRunner.csproj new file mode 100644 index 000000000..e95d513bb --- /dev/null +++ b/samples/DemoMSTestSdk/ProjectUsingMSTestRunner/ProjectUsingMSTestRunner.csproj @@ -0,0 +1,39 @@ + + + + net8.0 + enable + enable + false + + + + + + + diff --git a/samples/DemoMSTestSdk/ProjectUsingMSTestRunner/UnitTest1.cs b/samples/DemoMSTestSdk/ProjectUsingMSTestRunner/UnitTest1.cs new file mode 100644 index 000000000..1fffeba74 --- /dev/null +++ b/samples/DemoMSTestSdk/ProjectUsingMSTestRunner/UnitTest1.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace ProjectUsingMSTestRunner; + +[TestClass] +public class UnitTest1 +{ + [TestMethod] + public void TestMethod1() + { + } +} \ No newline at end of file diff --git a/samples/DemoMSTestSdk/ProjectUsingMSTestRunner/Usings.cs b/samples/DemoMSTestSdk/ProjectUsingMSTestRunner/Usings.cs new file mode 100644 index 000000000..af4ead20b --- /dev/null +++ b/samples/DemoMSTestSdk/ProjectUsingMSTestRunner/Usings.cs @@ -0,0 +1,4 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +global using Microsoft.VisualStudio.TestTools.UnitTesting; \ No newline at end of file diff --git a/samples/DemoMSTestSdk/ProjectUsingVSTest/ProjectUsingVSTest.csproj b/samples/DemoMSTestSdk/ProjectUsingVSTest/ProjectUsingVSTest.csproj new file mode 100644 index 000000000..bfdbe43c3 --- /dev/null +++ b/samples/DemoMSTestSdk/ProjectUsingVSTest/ProjectUsingVSTest.csproj @@ -0,0 +1,33 @@ + + + + net8.0 + enable + enable + false + + + true + + + + + diff --git a/samples/DemoMSTestSdk/ProjectUsingVSTest/UnitTest1.cs b/samples/DemoMSTestSdk/ProjectUsingVSTest/UnitTest1.cs new file mode 100644 index 000000000..7508f20c0 --- /dev/null +++ b/samples/DemoMSTestSdk/ProjectUsingVSTest/UnitTest1.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace ProjectUsingVSTest; + +[TestClass] +public class UnitTest1 +{ + [TestMethod] + public void TestMethod1() + { + } +} \ No newline at end of file diff --git a/samples/DemoMSTestSdk/ProjectUsingVSTest/Usings.cs b/samples/DemoMSTestSdk/ProjectUsingVSTest/Usings.cs new file mode 100644 index 000000000..af4ead20b --- /dev/null +++ b/samples/DemoMSTestSdk/ProjectUsingVSTest/Usings.cs @@ -0,0 +1,4 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +global using Microsoft.VisualStudio.TestTools.UnitTesting; \ No newline at end of file diff --git a/samples/DemoMSTestSdk/ProjectWithNativeAOT/ProjectWithNativeAOT.csproj b/samples/DemoMSTestSdk/ProjectWithNativeAOT/ProjectWithNativeAOT.csproj new file mode 100644 index 000000000..959b9dc38 --- /dev/null +++ b/samples/DemoMSTestSdk/ProjectWithNativeAOT/ProjectWithNativeAOT.csproj @@ -0,0 +1,41 @@ + + + + net8.0 + enable + enable + false + + + true + + + + + diff --git a/samples/DemoMSTestSdk/ProjectWithNativeAOT/UnitTest1.cs b/samples/DemoMSTestSdk/ProjectWithNativeAOT/UnitTest1.cs new file mode 100644 index 000000000..d38be95bd --- /dev/null +++ b/samples/DemoMSTestSdk/ProjectWithNativeAOT/UnitTest1.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace ProjectWithNativeAOT; + +[TestClass] +public class UnitTest1 +{ + [TestMethod] + public void TestMethod1() + { + } +} \ No newline at end of file diff --git a/samples/DemoMSTestSdk/ProjectWithNativeAOT/Usings.cs b/samples/DemoMSTestSdk/ProjectWithNativeAOT/Usings.cs new file mode 100644 index 000000000..af4ead20b --- /dev/null +++ b/samples/DemoMSTestSdk/ProjectWithNativeAOT/Usings.cs @@ -0,0 +1,4 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +global using Microsoft.VisualStudio.TestTools.UnitTesting; \ No newline at end of file