diff --git a/eng/Versions.props b/eng/Versions.props index acbfa1cdbc18..9e1eee8c4060 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -1,4 +1,5 @@ + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) @@ -29,8 +30,6 @@ true true true - - 1.9.0-preview.25381.6 30 @@ -71,8 +70,6 @@ 0.3.49-beta 1.0.52 - - 3.1.3 @@ -81,55 +78,12 @@ 0.2.0 - - - 2.0.0-preview.1.25377.103 - - - - 2.2.0-beta.25377.103 - 9.1.0-preview.1.24555.3 - - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 8.0.0-rc.1.23414.4 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 2.1.0 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 8.0.0 @@ -143,31 +97,6 @@ 4.5.4 8.0.0 - - - 7.0.0-preview.1.100 - 7.0.0-preview.1.100 - 7.0.0-preview.1.100 - 7.0.0-preview.1.100 - 7.0.0-preview.1.100 - 7.0.0-preview.1.100 - 7.0.0-preview.1.100 - 7.0.0-preview.1.100 - 7.0.0-preview.1.100 - 7.0.0-preview.1.100 - 7.0.0-preview.1.100 - 7.0.0-preview.1.100 - - - - 18.0.0-preview-25377-103 - 18.0.0-preview-25377-103 - 18.0.0-preview-25377-103 - - - - 10.0.0-preview.25377.103 - - 17.15.0-preview-25377-103 - 17.15.0-preview-25377-103 17.11.4 17.13 - - - 10.0.100-preview.7.25377.103 - 10.0.100-preview.7.25377.103 - 10.0.100-preview.7.25377.103 - 10.0.100-preview.7.25377.103 - 10.0.100-preview.7.25377.103 - - 10.0.100-preview.7.25377.103 - 10.0.100-preview.7.25377.103 - 10.0.100-preview.7.25377.103 - 10.0.100-preview.7.25377.103 - - - - 14.0.100-preview7.25377.103 - - - - 5.0.0-2.25377.103 - 5.0.0-2.25377.103 - 5.0.0-2.25377.103 - 5.0.0-2.25377.103 - 5.0.0-2.25377.103 - 5.0.0-2.25377.103 - 5.0.0-2.25377.103 - 5.0.0-2.25377.103 - 5.0.0-2.25377.103 - 5.0.0-2.25377.103 - 5.0.0-2.25377.103 - - - - 10.0.0-rc.1.25377.103 - 10.0.0-rc.1.25377.103 - 10.0.0-rc.1.25377.103 - 10.0.0-rc.1.25377.103 - 10.0.0-rc.1.25377.103 - 10.0.0-rc.1.25377.103 - 10.0.0-rc.1.25377.103 - 10.0.0-preview.5.25265.101 - 10.0.0-rc.1.25377.103 - 10.0.0-rc.1.25377.103 - 10.0.0-rc.1.25377.103 - 10.0.0-rc.1.25377.103 - 10.0.0-rc.1.25377.103 - 10.0.0-rc.1.25377.103 - 10.0.0-rc.1.25377.103 - 10.0.0-rc.1.25377.103 - 10.0.0-rc.1.25377.103 - 10.0.0-rc.1.25377.103 - 10.0.0-rc.1.25377.103 - 10.0.0-rc.1.25377.103 - 10.0.0-rc.1.25377.103 - 10.0.0-rc.1.25377.103 - 10.0.0-rc.1.25377.103 - 10.0.0-rc.1.25377.103 - 10.0.0-rc.1.25377.103 - 10.0.0-rc.1.25377.103 - 10.0.0-preview.5.25265.101 - 10.0.0-rc.1.25377.103 - 10.0.0-rc.1.25377.103 - 10.0.0-rc.1.25377.103 - - - - 10.0.0-preview.25377.103 - 10.0.0-preview.25377.103 - 10.0.0-preview.25377.103 - - 10.0.0-preview.7.25377.103 - 10.0.0-preview.7.25377.103 3.1.56 3.1.56 @@ -273,37 +128,11 @@ 3.1.12 2.0.23 - - - 10.0.0-preview.7.25377.103 - - - 2.2.0-beta.19072.10 - 10.0.0-preview.24602.1 - 1.6.10 4.0.1 - - - 10.0.0-beta.25377.103 - 10.0.0-beta.25377.103 - 10.0.0-beta.25377.103 - 10.0.0-beta.25377.103 - 10.0.0-beta.25377.103 - 10.0.0-beta.25377.103 - - - - 10.0.0-beta.25377.103 - 10.0.0-beta.25377.103 - 10.0.0-beta.25377.103 - 10.0.0-beta.25377.103 - 10.0.0-beta.25377.103 - 10.0.0-beta.25377.103 - true diff --git a/sdk.slnx b/sdk.slnx index 49ce83204fd2..a2a04af45101 100644 --- a/sdk.slnx +++ b/sdk.slnx @@ -3,6 +3,7 @@ + diff --git a/test/Microsoft.NET.TestFramework/TestAsset.cs b/test/Microsoft.NET.TestFramework/TestAsset.cs index aedd70956111..54b2ae2d5315 100644 --- a/test/Microsoft.NET.TestFramework/TestAsset.cs +++ b/test/Microsoft.NET.TestFramework/TestAsset.cs @@ -270,14 +270,14 @@ public TestAsset Restore(ITestOutputHelper log, string relativePath = "", params return this; } - public string ReadMSTestVersionFromProps(string propsFilePath) + public string ReadMSTestPackageVersionFromProps(string propsFilePath) { XDocument doc = XDocument.Load(propsFilePath); - XElement? msTestVersionElement = doc.Descendants("MSTestVersion").FirstOrDefault(); - return msTestVersionElement?.Value ?? throw new InvalidOperationException("MSTestVersion not found in Version.props"); + XElement? msTestVersionElement = doc.Descendants("MSTestPackageVersion").FirstOrDefault(); + return msTestVersionElement?.Value ?? throw new InvalidOperationException("MSTestPackageVersion not found in Version.props"); } - public void UpdateProjectFileWithMSTestVersion(string projectPath, string msTestVersion) + public void UpdateProjectFileWithMSTestPackageVersion(string projectPath, string msTestVersion) { if (projectPath is null) { diff --git a/test/UnitTests.proj b/test/UnitTests.proj index 9f0dafe191c3..5865b41aedbe 100644 --- a/test/UnitTests.proj +++ b/test/UnitTests.proj @@ -101,6 +101,9 @@ eng/ + + eng/ + eng/ diff --git a/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTestsWithArtifacts.cs b/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTestsWithArtifacts.cs index 3996fd068428..75d0db9ad8eb 100644 --- a/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTestsWithArtifacts.cs +++ b/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTestsWithArtifacts.cs @@ -52,11 +52,11 @@ public void RunTestProjectWithCodeCoverage_ShouldReturnExitCodeGenericFailure(st { TestAsset testInstance = _testAssetsManager.CopyTestAsset("TestProjectSolutionWithCodeCoverage", Guid.NewGuid().ToString()).WithSource(); - // Read MSTestVersion from Versions.props and update the .csproj file - // Search for Versions.props file from the current directory up to the root - string? versionsPropsPath = PathUtility.FindFileInParentDirectories(TestContext.Current.TestExecutionDirectory, $"eng{Path.DirectorySeparatorChar}Versions.props") ?? throw new FileNotFoundException("Versions.props file not found."); - string msTestVersion = testInstance.ReadMSTestVersionFromProps(versionsPropsPath); - testInstance.UpdateProjectFileWithMSTestVersion(Path.Combine($@"{testInstance.Path}{PathUtility.GetDirectorySeparatorChar()}TestProject", "TestProject.csproj"), msTestVersion); + // Read MSTestPackageVersion from Version.Details.props and update the .csproj file + // Search for Version.Details.props file from the current directory up to the root + string? versionsPropsPath = PathUtility.FindFileInParentDirectories(TestContext.Current.TestExecutionDirectory, $"eng{Path.DirectorySeparatorChar}Version.Details.props") ?? throw new FileNotFoundException("Version.Details.props file not found."); + string msTestVersion = testInstance.ReadMSTestPackageVersionFromProps(versionsPropsPath); + testInstance.UpdateProjectFileWithMSTestPackageVersion(Path.Combine($@"{testInstance.Path}{PathUtility.GetDirectorySeparatorChar()}TestProject", "TestProject.csproj"), msTestVersion); CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false) .WithWorkingDirectory(testInstance.Path)