From 981ea31151c90ef43ad8b07c26378917f128bd24 Mon Sep 17 00:00:00 2001 From: AR-May <67507805+AR-May@users.noreply.github.com> Date: Wed, 13 Dec 2023 18:16:40 +0100 Subject: [PATCH 01/12] Disable localization for vs17.8 (#9531) * Disable localization for vs17.8 * Bump version --- .vsts-dotnet.yml | 2 +- eng/Versions.props | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.vsts-dotnet.yml b/.vsts-dotnet.yml index 343cec26283..9a358d4c427 100644 --- a/.vsts-dotnet.yml +++ b/.vsts-dotnet.yml @@ -37,7 +37,7 @@ variables: - name: _DotNetValidationArtifactsCategory value: .NETCoreValidation - name: EnableReleaseOneLocBuild - value: true + value: false - name: Codeql.Enabled value: true diff --git a/eng/Versions.props b/eng/Versions.props index a26595acca5..6aace9e7fcb 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -2,7 +2,7 @@ - 17.8.3release + 17.8.4release 17.7.0 15.1.0.0 preview From 65abd9aec4b4d48410f8a3da1aa181fb6e44c2be Mon Sep 17 00:00:00 2001 From: Rainer Sigwald Date: Mon, 18 Dec 2023 09:04:26 -0600 Subject: [PATCH 02/12] Include M.Common.Test.targets in VSIX (#9547) This was added in #9193 but not usable in VS. --- src/MSBuild/MSBuild.csproj | 1 + src/Package/MSBuild.VSSetup/files.swr | 2 ++ src/Tasks/Microsoft.Build.Tasks.csproj | 3 +++ 3 files changed, 6 insertions(+) diff --git a/src/MSBuild/MSBuild.csproj b/src/MSBuild/MSBuild.csproj index 72b71371e3b..4f7383fa154 100644 --- a/src/MSBuild/MSBuild.csproj +++ b/src/MSBuild/MSBuild.csproj @@ -256,6 +256,7 @@ <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Common.props" TargetFramework="%(_TargetFrameworks.Identity)" Subdirectory="Current\" /> <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Common.targets" TargetFramework="%(_TargetFrameworks.Identity)" /> <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Common.tasks" TargetFramework="%(_TargetFrameworks.Identity)" /> + <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Common.Test.targets" TargetFramework="%(_TargetFrameworks.Identity)" /> <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Managed.targets" TargetFramework="%(_TargetFrameworks.Identity)" /> <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Managed.Before.targets" TargetFramework="%(_TargetFrameworks.Identity)" /> <_OurFiles Include="$(OutputPath)%(_TargetFrameworks.Identity)\Microsoft.Managed.After.targets" TargetFramework="%(_TargetFrameworks.Identity)" /> diff --git a/src/Package/MSBuild.VSSetup/files.swr b/src/Package/MSBuild.VSSetup/files.swr index 06d5e138401..211d1307c6f 100644 --- a/src/Package/MSBuild.VSSetup/files.swr +++ b/src/Package/MSBuild.VSSetup/files.swr @@ -64,6 +64,7 @@ folder InstallDir:\MSBuild\Current\Bin file source=$(X86BinPath)Microsoft.Common.overridetasks file source=$(X86BinPath)Microsoft.Common.targets file source=$(X86BinPath)Microsoft.Common.tasks + file source=$(X86BinPath)Microsoft.Common.Test.targets file source=$(X86BinPath)Microsoft.Managed.targets file source=$(X86BinPath)Microsoft.Managed.Before.targets file source=$(X86BinPath)Microsoft.Managed.After.targets @@ -212,6 +213,7 @@ folder InstallDir:\MSBuild\Current\Bin\amd64 file source=$(X86BinPath)Microsoft.Common.overridetasks file source=$(X86BinPath)Microsoft.Common.targets file source=$(X86BinPath)Microsoft.Common.tasks + file source=$(X86BinPath)Microsoft.Common.Test.targets file source=$(X86BinPath)Microsoft.Managed.targets file source=$(X86BinPath)Microsoft.Managed.Before.targets file source=$(X86BinPath)Microsoft.Managed.After.targets diff --git a/src/Tasks/Microsoft.Build.Tasks.csproj b/src/Tasks/Microsoft.Build.Tasks.csproj index b320fd94dd6..d51513a7139 100644 --- a/src/Tasks/Microsoft.Build.Tasks.csproj +++ b/src/Tasks/Microsoft.Build.Tasks.csproj @@ -438,6 +438,9 @@ PreserveNewest + + PreserveNewest + PreserveNewest From 00e3ae8d5c3eaa575b1f48d418b89d24501dae5c Mon Sep 17 00:00:00 2001 From: Mariana Dematte Date: Mon, 18 Dec 2023 16:25:04 +0100 Subject: [PATCH 03/12] Added import of .user file for multi-targeted builds (#9444) (#9558) Fixes #9131 Context As described on the issue, muti-targeted builds did not import the .user file on the outer build. This change makes the outer build import the .user file. Changes Made Added import reference to .user file in Microsoft.Common.CrossTargeting.targets . Testing Test is in SDK repo (dotnet/sdk#37192) --- src/Tasks/Microsoft.Common.CrossTargeting.targets | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Tasks/Microsoft.Common.CrossTargeting.targets b/src/Tasks/Microsoft.Common.CrossTargeting.targets index 44bed1b25ba..07dd2aeb869 100644 --- a/src/Tasks/Microsoft.Common.CrossTargeting.targets +++ b/src/Tasks/Microsoft.Common.CrossTargeting.targets @@ -19,6 +19,8 @@ Copyright (C) Microsoft Corporation. All rights reserved. + + Date: Mon, 18 Dec 2023 09:23:23 -0800 Subject: [PATCH 04/12] Fix sln-based graph builds with non-built projects with solution dependencies (#9503) Fixes #9500 Previously the code was considering all projects when building up the solution dependencies and later that was blowing up due to including projects which weren't built. This moves the logic to the same loop that already filters projects which don't build so should be (trivially) more efficient anyway. --- .../Graph/ProjectGraph_Tests.cs | 61 ++++++++++++--- src/Build/Graph/GraphBuilder.cs | 74 +++++++++---------- 2 files changed, 85 insertions(+), 50 deletions(-) diff --git a/src/Build.UnitTests/Graph/ProjectGraph_Tests.cs b/src/Build.UnitTests/Graph/ProjectGraph_Tests.cs index 825bbea6598..f2bc8fd22a8 100644 --- a/src/Build.UnitTests/Graph/ProjectGraph_Tests.cs +++ b/src/Build.UnitTests/Graph/ProjectGraph_Tests.cs @@ -681,13 +681,14 @@ public void ConstructGraphWithSolution() /* * This test exercises various key features of solution-based builds: * From AssignProjectConfiguration: - * Adding synthetic project references + * Adding synthetic project references (defined both before and after the depending project) * Resolving project configuration based on the sln * Handling unresolved project references with ShouldUnsetParentConfigurationAndPlatform=true * Handling unresolved project references with ShouldUnsetParentConfigurationAndPlatform=false * Project types other than "well-known" MSBuild project types: * Buildable project (wapproj) * Solution folder + * Project not included in build (also has solution dependencies as a regression test) * */ using (var env = TestEnvironment.Create()) @@ -697,9 +698,12 @@ public void ConstructGraphWithSolution() # Visual Studio Version 17 VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 17.0.31903.59 + Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Project8", "Project8.csproj", "{2022C11A-1405-4983-BEC2-3A8B0233108F}" + EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Project1", "Project1.csproj", "{8761499A-7280-43C4-A32F-7F41C47CA6DF}" ProjectSection(ProjectDependencies) = postProject {52B2ED64-1CFC-401B-8C5B-6D1E1DEADF98} = {52B2ED64-1CFC-401B-8C5B-6D1E1DEADF98} + {2022C11A-1405-4983-BEC2-3A8B0233108F} = {2022C11A-1405-4983-BEC2-3A8B0233108F} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Project2", "Project2.vcxproj", "{D638A8EF-3A48-45F2-913C-88B29FED03CB}" @@ -708,6 +712,11 @@ public void ConstructGraphWithSolution() EndProject Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "Project6", "Project6.wapproj", "{CA5CAD1A-224A-4171-B13A-F16E576FDD12}" EndProject + Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Project7", "Project7.csproj", "{28C7025E-2AB6-4962-A001-1E5B2271837C}" + ProjectSection(ProjectDependencies) = postProject + {52B2ED64-1CFC-401B-8C5B-6D1E1DEADF98} = {52B2ED64-1CFC-401B-8C5B-6D1E1DEADF98} + EndProjectSection + EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{0392E290-973E-4086-A58E-F927AAA65B9A}" ProjectSection(SolutionItems) = preProject SomeSolutionItemsFile = SomeSolutionItemsFile @@ -723,6 +732,18 @@ public void ConstructGraphWithSolution() Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2022C11A-1405-4983-BEC2-3A8B0233108F}.Debug|Win32.ActiveCfg = Debug|x86 + {2022C11A-1405-4983-BEC2-3A8B0233108F}.Debug|Win32.Build.0 = Debug|x86 + {2022C11A-1405-4983-BEC2-3A8B0233108F}.Debug|x64.ActiveCfg = Debug|x64 + {2022C11A-1405-4983-BEC2-3A8B0233108F}.Debug|x64.Build.0 = Debug|x64 + {2022C11A-1405-4983-BEC2-3A8B0233108F}.Debug|x86.ActiveCfg = Debug|x86 + {2022C11A-1405-4983-BEC2-3A8B0233108F}.Debug|x86.Build.0 = Debug|x86 + {2022C11A-1405-4983-BEC2-3A8B0233108F}.Release|Win32.ActiveCfg = Release|x86 + {2022C11A-1405-4983-BEC2-3A8B0233108F}.Release|Win32.Build.0 = Release|x86 + {2022C11A-1405-4983-BEC2-3A8B0233108F}.Release|x64.ActiveCfg = Release|x64 + {2022C11A-1405-4983-BEC2-3A8B0233108F}.Release|x64.Build.0 = Release|x64 + {2022C11A-1405-4983-BEC2-3A8B0233108F}.Release|x86.ActiveCfg = Release|x86 + {2022C11A-1405-4983-BEC2-3A8B0233108F}.Release|x86.Build.0 = Release|x86 {8761499A-7280-43C4-A32F-7F41C47CA6DF}.Debug|Win32.ActiveCfg = Debug|x86 {8761499A-7280-43C4-A32F-7F41C47CA6DF}.Debug|Win32.Build.0 = Debug|x86 {8761499A-7280-43C4-A32F-7F41C47CA6DF}.Debug|x64.ActiveCfg = Debug|x64 @@ -777,14 +798,14 @@ public void ConstructGraphWithSolution() {CA5CAD1A-224A-4171-B13A-F16E576FDD12}.Debug|x86.Build.0 = Debug|x86 {CA5CAD1A-224A-4171-B13A-F16E576FDD12}.Debug|x86.Deploy.0 = Debug|x86 {CA5CAD1A-224A-4171-B13A-F16E576FDD12}.Release|Win32.ActiveCfg = Release|x86 - {CA5CAD1A-224A-4171-B13A-F16E576FDD12}.Release|Win32.Build.0 = Release|x86 - {CA5CAD1A-224A-4171-B13A-F16E576FDD12}.Release|Win32.Deploy.0 = Release|x86 {CA5CAD1A-224A-4171-B13A-F16E576FDD12}.Release|x64.ActiveCfg = Release|x64 - {CA5CAD1A-224A-4171-B13A-F16E576FDD12}.Release|x64.Build.0 = Release|x64 - {CA5CAD1A-224A-4171-B13A-F16E576FDD12}.Release|x64.Deploy.0 = Release|x64 {CA5CAD1A-224A-4171-B13A-F16E576FDD12}.Release|x86.ActiveCfg = Release|x86 - {CA5CAD1A-224A-4171-B13A-F16E576FDD12}.Release|x86.Build.0 = Release|x86 - {CA5CAD1A-224A-4171-B13A-F16E576FDD12}.Release|x86.Deploy.0 = Release|x86 + {28C7025E-2AB6-4962-A001-1E5B2271837C}.Debug|Win32.ActiveCfg = Debug|x86 + {28C7025E-2AB6-4962-A001-1E5B2271837C}.Debug|x64.ActiveCfg = Debug|x64 + {28C7025E-2AB6-4962-A001-1E5B2271837C}.Debug|x86.ActiveCfg = Debug|x86 + {28C7025E-2AB6-4962-A001-1E5B2271837C}.Release|Win32.ActiveCfg = Release|x86 + {28C7025E-2AB6-4962-A001-1E5B2271837C}.Release|x64.ActiveCfg = Release|x64 + {28C7025E-2AB6-4962-A001-1E5B2271837C}.Release|x86.ActiveCfg = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -796,7 +817,7 @@ public void ConstructGraphWithSolution() ProjectRootElement project1Xml = ProjectRootElement.Create(); - // Project 1 depends on Project 2 using ProjectReference but there is a sln-based dependency defined on Project 3 as well. + // Project 1 depends on Project 2 using ProjectReference but there is a sln-based dependency defined on Project 3 and 8 as well. project1Xml.AddItem("ProjectReference", "Project2.vcxproj"); ProjectRootElement project2Xml = ProjectRootElement.Create(); @@ -814,6 +835,8 @@ public void ConstructGraphWithSolution() ProjectRootElement project4Xml = ProjectRootElement.Create(); ProjectRootElement project5Xml = ProjectRootElement.Create(); ProjectRootElement project6Xml = ProjectRootElement.Create(); + ProjectRootElement project7Xml = ProjectRootElement.Create(); + ProjectRootElement project8Xml = ProjectRootElement.Create(); string project1Path = Path.Combine(env.DefaultTestDirectory.Path, "Project1.csproj"); string project2Path = Path.Combine(env.DefaultTestDirectory.Path, "Project2.vcxproj"); @@ -821,6 +844,8 @@ public void ConstructGraphWithSolution() string project4Path = Path.Combine(env.DefaultTestDirectory.Path, "Project4.vcxproj"); string project5Path = Path.Combine(env.DefaultTestDirectory.Path, "Project5.vcxproj"); string project6Path = Path.Combine(env.DefaultTestDirectory.Path, "Project6.wapproj"); + string project7Path = Path.Combine(env.DefaultTestDirectory.Path, "Project7.csproj"); + string project8Path = Path.Combine(env.DefaultTestDirectory.Path, "Project8.csproj"); project1Xml.Save(project1Path); project2Xml.Save(project2Path); @@ -828,27 +853,33 @@ public void ConstructGraphWithSolution() project4Xml.Save(project4Path); project5Xml.Save(project5Path); project6Xml.Save(project6Path); + project7Xml.Save(project7Path); + project8Xml.Save(project8Path); var projectGraph = new ProjectGraph(slnFile.Path); - projectGraph.EntryPointNodes.Count.ShouldBe(4); + projectGraph.EntryPointNodes.Count.ShouldBe(5); + projectGraph.EntryPointNodes.Select(node => node.ProjectInstance.FullPath).ShouldBe(new[] { project1Path, project2Path, project3Path, project6Path, project8Path }, ignoreOrder: true); projectGraph.GraphRoots.Count.ShouldBe(2); projectGraph.GraphRoots.Select(node => node.ProjectInstance.FullPath).ShouldBe(new[] { project1Path, project6Path }, ignoreOrder: true); - projectGraph.ProjectNodes.Count.ShouldBe(6); + projectGraph.ProjectNodes.Count.ShouldBe(7); ProjectGraphNode project1Node = projectGraph.ProjectNodes.Single(node => node.ProjectInstance.FullPath == project1Path); project1Node.ProjectInstance.GlobalProperties["Configuration"].ShouldBe("Debug"); project1Node.ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); - project1Node.ProjectReferences.Count.ShouldBe(2); + project1Node.ProjectReferences.Count.ShouldBe(3); + project1Node.ProjectReferences.Select(node => node.ProjectInstance.FullPath).ShouldBe(new[] { project2Path, project3Path, project8Path }, ignoreOrder: true); ProjectGraphNode project2Node = projectGraph.ProjectNodes.Single(node => node.ProjectInstance.FullPath == project2Path); project2Node.ProjectInstance.GlobalProperties["Configuration"].ShouldBe("Debug"); project2Node.ProjectInstance.GlobalProperties["Platform"].ShouldBe("Win32"); project2Node.ProjectReferences.Count.ShouldBe(1); + project2Node.ProjectReferences.Select(node => node.ProjectInstance.FullPath).ShouldBe(new[] { project4Path }, ignoreOrder: true); ProjectGraphNode project3Node = projectGraph.ProjectNodes.Single(node => node.ProjectInstance.FullPath == project3Path); project3Node.ProjectInstance.GlobalProperties["Configuration"].ShouldBe("Debug"); project3Node.ProjectInstance.GlobalProperties["Platform"].ShouldBe("Win32"); project3Node.ProjectReferences.Count.ShouldBe(1); + project3Node.ProjectReferences.Select(node => node.ProjectInstance.FullPath).ShouldBe(new[] { project5Path }, ignoreOrder: true); // Configuration and Platform get unset ProjectGraphNode project4Node = projectGraph.ProjectNodes.Single(node => node.ProjectInstance.FullPath == project4Path); @@ -867,6 +898,14 @@ public void ConstructGraphWithSolution() project6Node.ProjectInstance.GlobalProperties["Configuration"].ShouldBe("Debug"); project6Node.ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); project6Node.ProjectReferences.Count.ShouldBe(0); + + // Project not included in the build + Assert.DoesNotContain(projectGraph.ProjectNodes, node => node.ProjectInstance.FullPath == project7Path); + + ProjectGraphNode project8Node = projectGraph.ProjectNodes.Single(node => node.ProjectInstance.FullPath == project8Path); + project8Node.ProjectInstance.GlobalProperties["Configuration"].ShouldBe("Debug"); + project8Node.ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); + project8Node.ProjectReferences.Count.ShouldBe(0); } } diff --git a/src/Build/Graph/GraphBuilder.cs b/src/Build/Graph/GraphBuilder.cs index b4450000e4b..e343a98c4cc 100644 --- a/src/Build/Graph/GraphBuilder.cs +++ b/src/Build/Graph/GraphBuilder.cs @@ -306,7 +306,8 @@ private static void AddEdgesFromSolution(IReadOnlyDictionary> globalPropertiesForProjectConfiguration = new(StringComparer.OrdinalIgnoreCase); IReadOnlyList projectsInSolution = solution.ProjectsInOrder; - var newEntryPoints = new List(projectsInSolution.Count); + List newEntryPoints = new(projectsInSolution.Count); + Dictionary> solutionDependencies = new(); foreach (ProjectInSolution project in projectsInSolution) { @@ -332,11 +333,43 @@ private static void AddEdgesFromSolution(IReadOnlyDictionary 0) + { + // code snippet cloned from SolutionProjectGenerator.GetSolutionConfiguration + + List solutionDependenciesForProject = new(project.Dependencies.Count); + foreach (string dependencyProjectGuid in project.Dependencies) + { + if (!solution.ProjectsByGuid.TryGetValue(dependencyProjectGuid, out ProjectInSolution dependencyProject)) + { + ProjectFileErrorUtilities.ThrowInvalidProjectFile( + "SubCategoryForSolutionParsingErrors", + new BuildEventFileInfo(solution.FullPath), + "SolutionParseProjectDepNotFoundError", + project.ProjectGuid, + dependencyProjectGuid); + } + + // Add it to the list of dependencies, but only if it should build in this solution configuration + // (If a project is not selected for build in the solution configuration, it won't build even if it's depended on by something that IS selected for build) + // .. and only if it's known to be MSBuild format, as projects can't use the information otherwise + if (dependencyProject.ProjectType == SolutionProjectType.KnownToBeMSBuildFormat) + { + solutionDependenciesForProject.Add(dependencyProject.AbsolutePath); + } + } + + if (solutionDependenciesForProject.Count > 0) + { + solutionDependencies.Add(project.AbsolutePath, solutionDependenciesForProject); + } + } } newEntryPoints.TrimExcess(); - return (newEntryPoints, GetSolutionDependencies(solution)); + return (newEntryPoints, solutionDependencies); SolutionConfigurationInSolution SelectSolutionConfiguration(SolutionFile solutionFile, IDictionary globalProperties) { @@ -367,43 +400,6 @@ ProjectConfigurationInSolution SelectProjectConfiguration( var partiallyMarchedConfig = projectConfigs.FirstOrDefault(pc => pc.Value.ConfigurationName.Equals(solutionConfig.ConfigurationName, StringComparison.OrdinalIgnoreCase)).Value; return partiallyMarchedConfig ?? projectConfigs.First().Value; } - - IReadOnlyDictionary> GetSolutionDependencies(SolutionFile solutionFile) - { - var solutionDependencies = new Dictionary>(); - - foreach (var projectWithDependencies in solutionFile.ProjectsInOrder.Where(p => p.Dependencies.Count != 0)) - { - solutionDependencies[projectWithDependencies.AbsolutePath] = projectWithDependencies.Dependencies.Select( - dependencyGuid => - { - // code snippet cloned from SolutionProjectGenerator.AddPropertyGroupForSolutionConfiguration - - if (!solutionFile.ProjectsByGuid.TryGetValue(dependencyGuid, out var dependencyProject)) - { - // If it's not itself part of the solution, that's an invalid solution - ProjectFileErrorUtilities.VerifyThrowInvalidProjectFile( - dependencyProject != null, - "SubCategoryForSolutionParsingErrors", - new BuildEventFileInfo(solutionFile.FullPath), - "SolutionParseProjectDepNotFoundError", - projectWithDependencies.ProjectGuid, - dependencyGuid); - } - - // Add it to the list of dependencies, but only if it should build in this solution configuration - // (If a project is not selected for build in the solution configuration, it won't build even if it's depended on by something that IS selected for build) - // .. and only if it's known to be MSBuild format, as projects can't use the information otherwise - return dependencyProject?.ProjectType == SolutionProjectType.KnownToBeMSBuildFormat - ? dependencyProject.AbsolutePath - : null; - }) - .Where(p => p != null) - .ToArray(); - } - - return solutionDependencies; - } } private static List AddGraphBuildPropertyToEntryPoints(IEnumerable entryPoints) From 44ea68dcf63e0fd3aaa5cf32cebfcde342ae2108 Mon Sep 17 00:00:00 2001 From: Forgind <12969783+Forgind@users.noreply.github.com> Date: Mon, 18 Dec 2023 09:39:45 -0800 Subject: [PATCH 05/12] Catch InvalidProjectFileException Fixes #9394 (#9400) Handle InvalidProjectFileExceptions as expected/user errors. Add \n to errors logged by SimpleErrorLogger. Fixes #9394 --- src/Build/Logging/SimpleErrorLogger.cs | 4 +-- src/MSBuild.UnitTests/XMake_Tests.cs | 11 +++++++ src/MSBuild/XMake.cs | 43 +++++++++++++------------- 3 files changed, 34 insertions(+), 24 deletions(-) diff --git a/src/Build/Logging/SimpleErrorLogger.cs b/src/Build/Logging/SimpleErrorLogger.cs index 6414324064b..a1e387f69aa 100644 --- a/src/Build/Logging/SimpleErrorLogger.cs +++ b/src/Build/Logging/SimpleErrorLogger.cs @@ -70,11 +70,11 @@ private void LogWithColor(string message, TerminalColor color) { if (acceptAnsiColorCodes) { - Console.Error.Write(AnsiCodes.Colorize(message, color)); + Console.Error.WriteLine(AnsiCodes.Colorize(message, color)); } else { - Console.Error.Write(message); + Console.Error.WriteLine(message); } } diff --git a/src/MSBuild.UnitTests/XMake_Tests.cs b/src/MSBuild.UnitTests/XMake_Tests.cs index ddc95774837..c18c5ad2d90 100644 --- a/src/MSBuild.UnitTests/XMake_Tests.cs +++ b/src/MSBuild.UnitTests/XMake_Tests.cs @@ -703,6 +703,17 @@ public void InvalidMaxCPUCountSwitch4() }); } + [Fact] + public void GetPropertyWithInvalidProjectThrowsInvalidProjectFileExceptionNotInternalError() + { + using TestEnvironment env = TestEnvironment.Create(); + TransientTestFile project = env.CreateFile("testProject.csproj", "Project"); + string result = RunnerUtilities.ExecMSBuild($" {project.Path} -getProperty:Foo", out bool success); + success.ShouldBeFalse(); + result.ShouldContain("MSB4025"); + result.ShouldNotContain("MSB1025"); + } + [Theory] [InlineData("-getProperty:Foo;Bar", true, "EvalValue", false, false, false, true, false)] [InlineData("-getProperty:Foo;Bar -t:Build", true, "TargetValue", false, false, false, true, false)] diff --git a/src/MSBuild/XMake.cs b/src/MSBuild/XMake.cs index 8f2970dddd1..0210df145df 100644 --- a/src/MSBuild/XMake.cs +++ b/src/MSBuild/XMake.cs @@ -809,11 +809,18 @@ public static ExitType Execute( } else if ((getProperty.Length > 0 || getItem.Length > 0) && (targets is null || targets.Length == 0)) { - using (ProjectCollection collection = new(globalProperties, loggers, ToolsetDefinitionLocations.Default)) + try { - Project project = collection.LoadProject(projectFile, globalProperties, toolsVersion); - exitType = OutputPropertiesAfterEvaluation(getProperty, getItem, project); - collection.LogBuildFinishedEvent(exitType == ExitType.Success); + using (ProjectCollection collection = new(globalProperties, loggers, ToolsetDefinitionLocations.Default)) + { + Project project = collection.LoadProject(projectFile, globalProperties, toolsVersion); + exitType = OutputPropertiesAfterEvaluation(getProperty, getItem, project); + collection.LogBuildFinishedEvent(exitType == ExitType.Success); + } + } + catch (InvalidProjectFileException) + { + exitType = ExitType.BuildError; } } else // regular build @@ -1031,28 +1038,20 @@ public static ExitType Execute( private static ExitType OutputPropertiesAfterEvaluation(string[] getProperty, string[] getItem, Project project) { - try + // Special case if the user requests exactly one property: skip json formatting + if (getProperty.Length == 1 && getItem.Length == 0) { - // Special case if the user requests exactly one property: skip json formatting - if (getProperty.Length == 1 && getItem.Length == 0) - { - Console.WriteLine(project.GetPropertyValue(getProperty[0])); - } - else - { - JsonOutputFormatter jsonOutputFormatter = new(); - jsonOutputFormatter.AddPropertiesInJsonFormat(getProperty, property => project.GetPropertyValue(property)); - jsonOutputFormatter.AddItemsInJsonFormat(getItem, project); - Console.WriteLine(jsonOutputFormatter.ToString()); - } - - return ExitType.Success; + Console.WriteLine(project.GetPropertyValue(getProperty[0])); } - catch (InvalidProjectFileException e) + else { - Console.Error.WriteLine(e.Message); - return ExitType.BuildError; + JsonOutputFormatter jsonOutputFormatter = new(); + jsonOutputFormatter.AddPropertiesInJsonFormat(getProperty, property => project.GetPropertyValue(property)); + jsonOutputFormatter.AddItemsInJsonFormat(getItem, project); + Console.WriteLine(jsonOutputFormatter.ToString()); } + + return ExitType.Success; } private static ExitType OutputBuildInformationInJson(BuildResult result, string[] getProperty, string[] getItem, string[] getTargetResult, ILogger[] loggers, ExitType exitType) From 4ac8d42574b84dcdc0629840ba448583c011378e Mon Sep 17 00:00:00 2001 From: Kirill Osenkov Date: Mon, 18 Dec 2023 10:01:30 -0800 Subject: [PATCH 06/12] Pass submissionId to the BuildEventContext used by SolutionProjectGenerator (#9470) * Pass submissionId to the BuildEventContext used by SolutionProjectGenerator When evaluating the generated .sln.metaproj, we do pass a valid submissionId, but then we don't use it when creating the BuildEventContext used by the ProjectInstance to log evaluation events. So evaluation logging events end up having SubmissionId == -1, and thus the loggers registered with the MuxLogger in the IDE do not get the evaluation events. Fixes #9469 * Ensure that BuildEventContext passed to LoadSolutionForBuild has a valid SubmissionId This way Metaproject generated and other events get properly routed to MuxLogger and other loggers that care about the SubmissionId. --- src/Build/BackEnd/BuildManager/BuildManager.cs | 9 ++++++++- src/Build/Instance/ProjectInstance.cs | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Build/BackEnd/BuildManager/BuildManager.cs b/src/Build/BackEnd/BuildManager/BuildManager.cs index bc1e535abab..2b2a01fee65 100644 --- a/src/Build/BackEnd/BuildManager/BuildManager.cs +++ b/src/Build/BackEnd/BuildManager/BuildManager.cs @@ -1453,13 +1453,20 @@ private void LoadSolutionIntoConfiguration(BuildRequestConfiguration config, Bui } ErrorUtilities.VerifyThrow(FileUtilities.IsSolutionFilename(config.ProjectFullPath), "{0} is not a solution", config.ProjectFullPath); + + var buildEventContext = request.BuildEventContext; + if (buildEventContext == BuildEventContext.Invalid) + { + buildEventContext = new BuildEventContext(request.SubmissionId, 0, BuildEventContext.InvalidProjectInstanceId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidTaskId); + } + var instances = ProjectInstance.LoadSolutionForBuild( config.ProjectFullPath, config.GlobalProperties, config.ExplicitToolsVersionSpecified ? config.ToolsVersion : null, _buildParameters, ((IBuildComponentHost)this).LoggingService, - request.BuildEventContext, + buildEventContext, false /* loaded by solution parser*/, config.RequestedTargets, SdkResolverService, diff --git a/src/Build/Instance/ProjectInstance.cs b/src/Build/Instance/ProjectInstance.cs index 92b2cf72307..0be0eeee71e 100644 --- a/src/Build/Instance/ProjectInstance.cs +++ b/src/Build/Instance/ProjectInstance.cs @@ -498,7 +498,7 @@ internal ProjectInstance(ProjectRootElement xml, IDictionary glo /// internal ProjectInstance(ProjectRootElement xml, IDictionary globalProperties, string toolsVersion, ILoggingService loggingService, int visualStudioVersionFromSolution, ProjectCollection projectCollection, ISdkResolverService sdkResolverService, int submissionId) { - BuildEventContext buildEventContext = new BuildEventContext(0, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId); + BuildEventContext buildEventContext = new BuildEventContext(submissionId, 0, BuildEventContext.InvalidProjectInstanceId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidTaskId); Initialize(xml, globalProperties, toolsVersion, null, visualStudioVersionFromSolution, new BuildParameters(projectCollection), loggingService, buildEventContext, sdkResolverService, submissionId); } From 352c48c0217a664f9190272ff69163f7295bded4 Mon Sep 17 00:00:00 2001 From: Rainer Sigwald Date: Mon, 18 Dec 2023 16:23:13 -0600 Subject: [PATCH 07/12] Bump to .NET 8 GA package refs (#9535) * darc update-dependencies --id 199769 This should be the GA 8.0 build. * Add Tasks.Dataflow and Channels deps ``` darc add-dependency --name System.Threading.Channels --repo https://dev.azure.com/dnceng/internal/_git/dotnet-runtime --version 8.0.0 --commit 5535e31a712343a63f5d7d796cd874e563e5ac14 --type product darc add-dependency --name System.Threading.Channels --repo https://dev.azure.com/dnceng/internal/_git/dotnet-runtime --version 8.0.0 --commit 5535e31a712343a63f5d7d796cd874e563e5ac14 --type product ``` * Binding redirect updates to 8.0 versions * extend SourceBuildPrebuiltBaseline to new patterns --- eng/Packages.props | 1 + eng/SourceBuildPrebuiltBaseline.xml | 14 +++-- eng/Version.Details.xml | 62 +++++++++++--------- eng/Versions.props | 15 ++--- src/MSBuild/app.amd64.config | 36 ++++++------ src/MSBuild/app.config | 16 ++--- src/Tasks/System.Resources.Extensions.pkgdef | 2 +- 7 files changed, 80 insertions(+), 66 deletions(-) diff --git a/eng/Packages.props b/eng/Packages.props index ac8df77f629..b84d22149d7 100644 --- a/eng/Packages.props +++ b/eng/Packages.props @@ -28,6 +28,7 @@ + diff --git a/eng/SourceBuildPrebuiltBaseline.xml b/eng/SourceBuildPrebuiltBaseline.xml index 15a527720b7..de395d970df 100644 --- a/eng/SourceBuildPrebuiltBaseline.xml +++ b/eng/SourceBuildPrebuiltBaseline.xml @@ -7,11 +7,15 @@ - - - - - + + + + + + + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index dcc55327fcf..68fb13bcf36 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -7,54 +7,62 @@ - - https://github.com/dotnet/runtime - d099f075e45d2aa6007a22b71b45a08758559f80 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 5535e31a712343a63f5d7d796cd874e563e5ac14 - - https://github.com/dotnet/runtime - d099f075e45d2aa6007a22b71b45a08758559f80 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 5535e31a712343a63f5d7d796cd874e563e5ac14 - - https://github.com/dotnet/runtime - d099f075e45d2aa6007a22b71b45a08758559f80 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 5535e31a712343a63f5d7d796cd874e563e5ac14 - - https://github.com/dotnet/runtime - d099f075e45d2aa6007a22b71b45a08758559f80 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 5535e31a712343a63f5d7d796cd874e563e5ac14 - - https://github.com/dotnet/runtime - d099f075e45d2aa6007a22b71b45a08758559f80 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 5535e31a712343a63f5d7d796cd874e563e5ac14 - - https://github.com/dotnet/runtime - d099f075e45d2aa6007a22b71b45a08758559f80 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 5535e31a712343a63f5d7d796cd874e563e5ac14 - - https://github.com/dotnet/runtime - d099f075e45d2aa6007a22b71b45a08758559f80 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 5535e31a712343a63f5d7d796cd874e563e5ac14 - - https://github.com/dotnet/runtime - d099f075e45d2aa6007a22b71b45a08758559f80 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 5535e31a712343a63f5d7d796cd874e563e5ac14 - - https://github.com/dotnet/runtime - 5b20af47d99620150c53eaf5db8636fdf730b126 + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 5535e31a712343a63f5d7d796cd874e563e5ac14 + + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 5535e31a712343a63f5d7d796cd874e563e5ac14 + + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 5535e31a712343a63f5d7d796cd874e563e5ac14 diff --git a/eng/Versions.props b/eng/Versions.props index 74bcb7f9d65..708ff0cadb1 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -26,8 +26,8 @@ - 7.0.0 - 7.0.0 + 8.0.0 + 8.0.0 4.5.5 4.3.4 - 7.0.0 - 7.0.0 - 7.0.0 + 8.0.0 + 8.0.0 + 8.0.0 5.0.0 7.0.0 + 8.0.0 + 8.0.0 @@ -53,8 +55,7 @@ 4.9.0-3.23608.9 6.9.0-preview.1.50 6.0.0 - 7.0.3 - 7.0.0 + 8.0.0 - - + + @@ -109,18 +109,18 @@ - - + + - - + + - - + + @@ -129,23 +129,23 @@ - - + + - - + + - - + + - - + + diff --git a/src/MSBuild/app.config b/src/MSBuild/app.config index cb3e75d2510..a372f0c4760 100644 --- a/src/MSBuild/app.config +++ b/src/MSBuild/app.config @@ -41,7 +41,7 @@ - + @@ -58,7 +58,7 @@ - + @@ -70,15 +70,15 @@ - + - + - + @@ -86,15 +86,15 @@ - + - + - + diff --git a/src/Tasks/System.Resources.Extensions.pkgdef b/src/Tasks/System.Resources.Extensions.pkgdef index 9315270511f..62579ad4643 100644 --- a/src/Tasks/System.Resources.Extensions.pkgdef +++ b/src/Tasks/System.Resources.Extensions.pkgdef @@ -4,4 +4,4 @@ "publicKeyToken"="cc7b13ffcd2ddd51" "culture"="neutral" "oldVersion"="0.0.0.0-99.9.9.9" -"newVersion"="7.0.0.0" +"newVersion"="8.0.0.0" From 40f51a57d4b46f3ed69276b343811262c08aa81a Mon Sep 17 00:00:00 2001 From: Farhad Alizada <104755925+f-alizada@users.noreply.github.com> Date: Tue, 19 Dec 2023 09:31:47 +0100 Subject: [PATCH 08/12] Build properties of telemetry on fly (#9552) * Combine GetProperties with UpdateProperties functionality. Remove public UpdateProperties from TelemetryBase --- .../BackEnd/KnownTelemetry_Tests.cs | 42 +++++++++---------- .../LoggingConfigurationTelemetry_Tests.cs | 34 +++++++-------- .../TerminalLoggerConfiguration_Tests.cs | 18 +++----- .../BackEnd/BuildManager/BuildManager.cs | 6 +-- src/Framework/Telemetry/BuildTelemetry.cs | 30 +++++++------ .../LoggingConfigurationTelemetry.cs | 36 +++++++++------- src/Framework/Telemetry/TelemetryBase.cs | 9 +--- 7 files changed, 84 insertions(+), 91 deletions(-) diff --git a/src/Build.UnitTests/BackEnd/KnownTelemetry_Tests.cs b/src/Build.UnitTests/BackEnd/KnownTelemetry_Tests.cs index 3b7b1987f96..cfbf63deebd 100644 --- a/src/Build.UnitTests/BackEnd/KnownTelemetry_Tests.cs +++ b/src/Build.UnitTests/BackEnd/KnownTelemetry_Tests.cs @@ -49,8 +49,7 @@ public void BuildTelemetryConstructedHasNoProperties() buildTelemetry.Target.ShouldBeNull(); buildTelemetry.Version.ShouldBeNull(); - buildTelemetry.UpdateEventProperties(); - buildTelemetry.Properties.ShouldBeEmpty(); + buildTelemetry.GetProperties().ShouldBeEmpty(); } [Fact] @@ -75,22 +74,23 @@ public void BuildTelemetryCreateProperProperties() buildTelemetry.Target = "clean"; buildTelemetry.Version = new Version(1, 2, 3, 4); - buildTelemetry.UpdateEventProperties(); - buildTelemetry.Properties.Count.ShouldBe(11); + var properties = buildTelemetry.GetProperties(); - buildTelemetry.Properties["BuildEngineDisplayVersion"].ShouldBe("Some Display Version"); - buildTelemetry.Properties["BuildEngineFrameworkName"].ShouldBe("new .NET"); - buildTelemetry.Properties["BuildEngineHost"].ShouldBe("Host description"); - buildTelemetry.Properties["InitialMSBuildServerState"].ShouldBe("hot"); - buildTelemetry.Properties["ProjectPath"].ShouldBe(@"C:\\dev\\theProject"); - buildTelemetry.Properties["ServerFallbackReason"].ShouldBe("busy"); - buildTelemetry.Properties["BuildSuccess"].ShouldBe("True"); - buildTelemetry.Properties["BuildTarget"].ShouldBe("clean"); - buildTelemetry.Properties["BuildEngineVersion"].ShouldBe("1.2.3.4"); + properties.Count.ShouldBe(11); + + properties["BuildEngineDisplayVersion"].ShouldBe("Some Display Version"); + properties["BuildEngineFrameworkName"].ShouldBe("new .NET"); + properties["BuildEngineHost"].ShouldBe("Host description"); + properties["InitialMSBuildServerState"].ShouldBe("hot"); + properties["ProjectPath"].ShouldBe(@"C:\\dev\\theProject"); + properties["ServerFallbackReason"].ShouldBe("busy"); + properties["BuildSuccess"].ShouldBe("True"); + properties["BuildTarget"].ShouldBe("clean"); + properties["BuildEngineVersion"].ShouldBe("1.2.3.4"); // verify computed - buildTelemetry.Properties["BuildDurationInMilliseconds"] = (finishedAt - startAt).TotalMilliseconds.ToString(CultureInfo.InvariantCulture); - buildTelemetry.Properties["InnerBuildDurationInMilliseconds"] = (finishedAt - innerStartAt).TotalMilliseconds.ToString(CultureInfo.InvariantCulture); + properties["BuildDurationInMilliseconds"] = (finishedAt - startAt).TotalMilliseconds.ToString(CultureInfo.InvariantCulture); + properties["InnerBuildDurationInMilliseconds"] = (finishedAt - innerStartAt).TotalMilliseconds.ToString(CultureInfo.InvariantCulture); } [Fact] @@ -100,22 +100,18 @@ public void BuildTelemetryHandleNullsInRecordedTimes() buildTelemetry.StartAt = DateTime.MinValue; buildTelemetry.FinishedAt = null; - buildTelemetry.UpdateEventProperties(); - buildTelemetry.Properties.ShouldBeEmpty(); + buildTelemetry.GetProperties().ShouldBeEmpty(); buildTelemetry.StartAt = null; buildTelemetry.FinishedAt = DateTime.MaxValue; - buildTelemetry.UpdateEventProperties(); - buildTelemetry.Properties.ShouldBeEmpty(); + buildTelemetry.GetProperties().ShouldBeEmpty(); buildTelemetry.InnerStartAt = DateTime.MinValue; buildTelemetry.FinishedAt = null; - buildTelemetry.UpdateEventProperties(); - buildTelemetry.Properties.ShouldBeEmpty(); + buildTelemetry.GetProperties().ShouldBeEmpty(); buildTelemetry.InnerStartAt = null; buildTelemetry.FinishedAt = DateTime.MaxValue; - buildTelemetry.UpdateEventProperties(); - buildTelemetry.Properties.ShouldBeEmpty(); + buildTelemetry.GetProperties().ShouldBeEmpty(); } } diff --git a/src/Build.UnitTests/BackEnd/LoggingConfigurationTelemetry_Tests.cs b/src/Build.UnitTests/BackEnd/LoggingConfigurationTelemetry_Tests.cs index 27b30d71997..d6e66cc6ecd 100644 --- a/src/Build.UnitTests/BackEnd/LoggingConfigurationTelemetry_Tests.cs +++ b/src/Build.UnitTests/BackEnd/LoggingConfigurationTelemetry_Tests.cs @@ -40,8 +40,7 @@ public void BuildTelemetryConstructedHasNoProperties() telemetry.BinaryLogger.ShouldBe(false); telemetry.BinaryLoggerUsedDefaultName.ShouldBe(false); - telemetry.UpdateEventProperties(); - telemetry.Properties.Where(kv => kv.Value != bool.FalseString).ShouldBeEmpty(); + telemetry.GetProperties().Where(kv => kv.Value != bool.FalseString).ShouldBeEmpty(); } [Fact] @@ -65,21 +64,20 @@ public void BuildTelemetryCreateProperProperties() BinaryLoggerUsedDefaultName = true }; - telemetry.UpdateEventProperties(); - - telemetry.Properties["TerminalLogger"].ShouldBe(bool.TrueString); - telemetry.Properties["TerminalLoggerUserIntent"].ShouldBe("on"); - telemetry.Properties["TerminalLoggerUserIntentSource"].ShouldBe("arg"); - telemetry.Properties["TerminalLoggerDefault"].ShouldBe("auto"); - telemetry.Properties["TerminalLoggerDefaultSource"].ShouldBe("sdk"); - telemetry.Properties["ConsoleLogger"].ShouldBe(bool.TrueString); - telemetry.Properties["ConsoleLoggerType"].ShouldBe("serial"); - telemetry.Properties["ConsoleLoggerVerbosity"].ShouldBe("minimal"); - telemetry.Properties["FileLogger"].ShouldBe(bool.TrueString); - telemetry.Properties["FileLoggerType"].ShouldBe("serial"); - telemetry.Properties["FileLoggersCount"].ShouldBe("2"); - telemetry.Properties["FileLoggerVerbosity"].ShouldBe("normal"); - telemetry.Properties["BinaryLogger"].ShouldBe(bool.TrueString); - telemetry.Properties["BinaryLoggerUsedDefaultName"].ShouldBe(bool.TrueString); + var properties = telemetry.GetProperties(); + properties["TerminalLogger"].ShouldBe(bool.TrueString); + properties["TerminalLoggerUserIntent"].ShouldBe("on"); + properties["TerminalLoggerUserIntentSource"].ShouldBe("arg"); + properties["TerminalLoggerDefault"].ShouldBe("auto"); + properties["TerminalLoggerDefaultSource"].ShouldBe("sdk"); + properties["ConsoleLogger"].ShouldBe(bool.TrueString); + properties["ConsoleLoggerType"].ShouldBe("serial"); + properties["ConsoleLoggerVerbosity"].ShouldBe("minimal"); + properties["FileLogger"].ShouldBe(bool.TrueString); + properties["FileLoggerType"].ShouldBe("serial"); + properties["FileLoggersCount"].ShouldBe("2"); + properties["FileLoggerVerbosity"].ShouldBe("normal"); + properties["BinaryLogger"].ShouldBe(bool.TrueString); + properties["BinaryLoggerUsedDefaultName"].ShouldBe(bool.TrueString); } } diff --git a/src/Build.UnitTests/TerminalLoggerConfiguration_Tests.cs b/src/Build.UnitTests/TerminalLoggerConfiguration_Tests.cs index 791bd5332ee..6266cb6e4c7 100644 --- a/src/Build.UnitTests/TerminalLoggerConfiguration_Tests.cs +++ b/src/Build.UnitTests/TerminalLoggerConfiguration_Tests.cs @@ -70,8 +70,7 @@ public void TerminalLoggerOn(string tlValue) FileLogger = false, }; - expectedTelemetry.UpdateEventProperties(); - foreach (KeyValuePair pair in expectedTelemetry.Properties) + foreach (KeyValuePair pair in expectedTelemetry.GetProperties()) { output.ShouldContain($"{expectedTelemetry.EventName}:{pair.Key}={pair.Value}"); } @@ -101,8 +100,7 @@ public void TerminalLoggerWithTlAutoIsOff(string tlValue) FileLogger = false, }; - expectedTelemetry.UpdateEventProperties(); - foreach (KeyValuePair pair in expectedTelemetry.Properties) + foreach (KeyValuePair pair in expectedTelemetry.GetProperties()) { output.ShouldContain($"{expectedTelemetry.EventName}:{pair.Key}={pair.Value}"); } @@ -129,8 +127,7 @@ public void TerminalLoggerDefaultByEnv() FileLogger = false, }; - expectedTelemetry.UpdateEventProperties(); - foreach (KeyValuePair pair in expectedTelemetry.Properties) + foreach (KeyValuePair pair in expectedTelemetry.GetProperties()) { output.ShouldContain($"{expectedTelemetry.EventName}:{pair.Key}={pair.Value}"); } @@ -159,8 +156,7 @@ public void TerminalLoggerOnByEnv(string envVarSource) FileLogger = false, }; - expectedTelemetry.UpdateEventProperties(); - foreach (KeyValuePair pair in expectedTelemetry.Properties) + foreach (KeyValuePair pair in expectedTelemetry.GetProperties()) { output.ShouldContain($"{expectedTelemetry.EventName}:{pair.Key}={pair.Value}"); } @@ -188,8 +184,7 @@ public void TerminalLoggerDefaultOn(string defaultValue) FileLogger = false, }; - expectedTelemetry.UpdateEventProperties(); - foreach (KeyValuePair pair in expectedTelemetry.Properties) + foreach (KeyValuePair pair in expectedTelemetry.GetProperties()) { output.ShouldContain($"{expectedTelemetry.EventName}:{pair.Key}={pair.Value}"); } @@ -219,8 +214,7 @@ public void TerminalLoggerDefaultOff(string defaultValue) FileLogger = false, }; - expectedTelemetry.UpdateEventProperties(); - foreach (KeyValuePair pair in expectedTelemetry.Properties) + foreach (KeyValuePair pair in expectedTelemetry.GetProperties()) { output.ShouldContain($"{expectedTelemetry.EventName}:{pair.Key}={pair.Value}"); } diff --git a/src/Build/BackEnd/BuildManager/BuildManager.cs b/src/Build/BackEnd/BuildManager/BuildManager.cs index 2b2a01fee65..b2aae4fb743 100644 --- a/src/Build/BackEnd/BuildManager/BuildManager.cs +++ b/src/Build/BackEnd/BuildManager/BuildManager.cs @@ -576,8 +576,7 @@ public void BeginBuild(BuildParameters parameters) LogDeferredMessages(loggingService, _deferredBuildMessages); // Log known deferred telemetry - KnownTelemetry.LoggingConfigurationTelemetry.UpdateEventProperties(); - loggingService.LogTelemetry(buildEventContext: null, KnownTelemetry.LoggingConfigurationTelemetry.EventName, KnownTelemetry.LoggingConfigurationTelemetry.Properties); + loggingService.LogTelemetry(buildEventContext: null, KnownTelemetry.LoggingConfigurationTelemetry.EventName, KnownTelemetry.LoggingConfigurationTelemetry.GetProperties()); InitializeCaches(); @@ -1090,8 +1089,7 @@ public void EndBuild() } _buildTelemetry.Host = host; - _buildTelemetry.UpdateEventProperties(); - loggingService.LogTelemetry(buildEventContext: null, _buildTelemetry.EventName, _buildTelemetry.Properties); + loggingService.LogTelemetry(buildEventContext: null, _buildTelemetry.EventName, _buildTelemetry.GetProperties()); // Clean telemetry to make it ready for next build submission. _buildTelemetry = null; } diff --git a/src/Framework/Telemetry/BuildTelemetry.cs b/src/Framework/Telemetry/BuildTelemetry.cs index 9515a2e185e..7e2e0c6b514 100644 --- a/src/Framework/Telemetry/BuildTelemetry.cs +++ b/src/Framework/Telemetry/BuildTelemetry.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections.Generic; using System.Globalization; namespace Microsoft.Build.Framework.Telemetry @@ -84,62 +85,67 @@ internal class BuildTelemetry : TelemetryBase /// public string? FrameworkName { get; set; } - public override void UpdateEventProperties() + public override IDictionary GetProperties() { + var properties = new Dictionary(); + + // populate property values if (DisplayVersion != null) { - Properties["BuildEngineDisplayVersion"] = DisplayVersion; + properties["BuildEngineDisplayVersion"] = DisplayVersion; } if (StartAt.HasValue && FinishedAt.HasValue) { - Properties["BuildDurationInMilliseconds"] = (FinishedAt.Value - StartAt.Value).TotalMilliseconds.ToString(CultureInfo.InvariantCulture); + properties["BuildDurationInMilliseconds"] = (FinishedAt.Value - StartAt.Value).TotalMilliseconds.ToString(CultureInfo.InvariantCulture); } if (InnerStartAt.HasValue && FinishedAt.HasValue) { - Properties["InnerBuildDurationInMilliseconds"] = (FinishedAt.Value - InnerStartAt.Value).TotalMilliseconds.ToString(CultureInfo.InvariantCulture); + properties["InnerBuildDurationInMilliseconds"] = (FinishedAt.Value - InnerStartAt.Value).TotalMilliseconds.ToString(CultureInfo.InvariantCulture); } if (FrameworkName != null) { - Properties["BuildEngineFrameworkName"] = FrameworkName; + properties["BuildEngineFrameworkName"] = FrameworkName; } if (Host != null) { - Properties["BuildEngineHost"] = Host; + properties["BuildEngineHost"] = Host; } if (InitialServerState != null) { - Properties["InitialMSBuildServerState"] = InitialServerState; + properties["InitialMSBuildServerState"] = InitialServerState; } if (Project != null) { - Properties["ProjectPath"] = Project; + properties["ProjectPath"] = Project; } if (ServerFallbackReason != null) { - Properties["ServerFallbackReason"] = ServerFallbackReason; + properties["ServerFallbackReason"] = ServerFallbackReason; } if (Success.HasValue) { - Properties["BuildSuccess"] = Success.HasValue.ToString(CultureInfo.InvariantCulture); + properties["BuildSuccess"] = Success.HasValue.ToString(CultureInfo.InvariantCulture); } if (Target != null) { - Properties["BuildTarget"] = Target; + properties["BuildTarget"] = Target; } if (Version != null) { - Properties["BuildEngineVersion"] = Version.ToString(); + properties["BuildEngineVersion"] = Version.ToString(); } + + return properties; } } } diff --git a/src/Framework/Telemetry/LoggingConfigurationTelemetry.cs b/src/Framework/Telemetry/LoggingConfigurationTelemetry.cs index 5281c43b9d2..493a945a526 100644 --- a/src/Framework/Telemetry/LoggingConfigurationTelemetry.cs +++ b/src/Framework/Telemetry/LoggingConfigurationTelemetry.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections.Generic; using System.Globalization; namespace Microsoft.Build.Framework.Telemetry; @@ -97,54 +98,59 @@ internal class LoggingConfigurationTelemetry : TelemetryBase /// public bool BinaryLoggerUsedDefaultName { get; set; } - public override void UpdateEventProperties() + public override IDictionary GetProperties() { - Properties["TerminalLogger"] = TerminalLogger.ToString(CultureInfo.InvariantCulture); + var properties = new Dictionary(); + + // populate property values + properties["TerminalLogger"] = TerminalLogger.ToString(CultureInfo.InvariantCulture); if (TerminalLoggerUserIntent != null) { - Properties["TerminalLoggerUserIntent"] = TerminalLoggerUserIntent; + properties["TerminalLoggerUserIntent"] = TerminalLoggerUserIntent; } if (TerminalLoggerUserIntentSource != null) { - Properties["TerminalLoggerUserIntentSource"] = TerminalLoggerUserIntentSource; + properties["TerminalLoggerUserIntentSource"] = TerminalLoggerUserIntentSource; } if (TerminalLoggerDefault != null) { - Properties["TerminalLoggerDefault"] = TerminalLoggerDefault; + properties["TerminalLoggerDefault"] = TerminalLoggerDefault; } if (TerminalLoggerDefaultSource != null) { - Properties["TerminalLoggerDefaultSource"] = TerminalLoggerDefaultSource; + properties["TerminalLoggerDefaultSource"] = TerminalLoggerDefaultSource; } - Properties["ConsoleLogger"] = ConsoleLogger.ToString(CultureInfo.InvariantCulture); + properties["ConsoleLogger"] = ConsoleLogger.ToString(CultureInfo.InvariantCulture); if (ConsoleLoggerType != null) { - Properties["ConsoleLoggerType"] = ConsoleLoggerType; + properties["ConsoleLoggerType"] = ConsoleLoggerType; } if (ConsoleLoggerVerbosity != null) { - Properties["ConsoleLoggerVerbosity"] = ConsoleLoggerVerbosity; + properties["ConsoleLoggerVerbosity"] = ConsoleLoggerVerbosity; } - Properties["FileLogger"] = FileLogger.ToString(CultureInfo.InvariantCulture); + properties["FileLogger"] = FileLogger.ToString(CultureInfo.InvariantCulture); if (FileLoggerType != null) { - Properties["FileLoggerType"] = FileLoggerType; - Properties["FileLoggersCount"] = FileLoggersCount.ToString(CultureInfo.InvariantCulture); + properties["FileLoggerType"] = FileLoggerType; + properties["FileLoggersCount"] = FileLoggersCount.ToString(CultureInfo.InvariantCulture); } if (FileLoggerVerbosity != null) { - Properties["FileLoggerVerbosity"] = FileLoggerVerbosity; + properties["FileLoggerVerbosity"] = FileLoggerVerbosity; } - Properties["BinaryLogger"] = BinaryLogger.ToString(CultureInfo.InvariantCulture); - Properties["BinaryLoggerUsedDefaultName"] = BinaryLoggerUsedDefaultName.ToString(CultureInfo.InvariantCulture); + properties["BinaryLogger"] = BinaryLogger.ToString(CultureInfo.InvariantCulture); + properties["BinaryLoggerUsedDefaultName"] = BinaryLoggerUsedDefaultName.ToString(CultureInfo.InvariantCulture); + + return properties; } } diff --git a/src/Framework/Telemetry/TelemetryBase.cs b/src/Framework/Telemetry/TelemetryBase.cs index d2475146c5b..9084c330488 100644 --- a/src/Framework/Telemetry/TelemetryBase.cs +++ b/src/Framework/Telemetry/TelemetryBase.cs @@ -13,12 +13,7 @@ internal abstract class TelemetryBase public abstract string EventName { get; } /// - /// Gets or sets a list of properties associated with the event. + /// Fetches all derived type members wrapped in Dictionary which will be used to build . /// - public IDictionary Properties { get; set; } = new Dictionary(); - - /// - /// Translate all derived type members into properties which will be used to build . - /// - public abstract void UpdateEventProperties(); + public abstract IDictionary GetProperties(); } From a1ad6b84fff44975e68c39fe4df637a455b217a8 Mon Sep 17 00:00:00 2001 From: Rainer Sigwald Date: Thu, 21 Dec 2023 03:59:15 -0600 Subject: [PATCH 09/12] When time increases by a digit, overwrite NodeStatus (#9563) Fixes #9562 by triggering a full-line redraw when the length of the duration string increases. --- .vsts-dotnet-ci.yml | 61 +++++++++++++++++++ src/MSBuild.UnitTests/MockStopwatch.cs | 34 +++++++++++ src/MSBuild.UnitTests/NodeStatus_Tests.cs | 20 +++--- ...playNodesOverwritesTime.Linux.verified.txt | 3 + ...isplayNodesOverwritesTime.OSX.verified.txt | 3 + ...ayNodesOverwritesTime.Windows.verified.txt | 3 + ...sWithNewTargetFramework.Linux.verified.txt | 4 +- ...tesWithNewTargetFramework.OSX.verified.txt | 4 +- ...ithNewTargetFramework.Windows.verified.txt | 4 +- ...isplayNodesShowsCurrent.Linux.verified.txt | 2 +- ....DisplayNodesShowsCurrent.OSX.verified.txt | 2 +- ...playNodesShowsCurrent.Windows.verified.txt | 2 +- ...rintBuildSummary_Failed.Linux.verified.txt | 2 +- ....PrintBuildSummary_Failed.OSX.verified.txt | 2 +- ...ntBuildSummary_Failed.Windows.verified.txt | 2 +- ...ummary_FailedWithErrors.Linux.verified.txt | 4 +- ...dSummary_FailedWithErrors.OSX.verified.txt | 4 +- ...mary_FailedWithErrors.Windows.verified.txt | 4 +- ...y_SucceededWithWarnings.Linux.verified.txt | 4 +- ...ary_SucceededWithWarnings.OSX.verified.txt | 4 +- ...SucceededWithWarnings.Windows.verified.txt | 4 +- ...mmediateMessage_Skipped.Linux.verified.txt | 2 +- ...tImmediateMessage_Skipped.OSX.verified.txt | 2 +- ...ediateMessage_Skipped.Windows.verified.txt | 2 +- ...mmediateMessage_Success.Linux.verified.txt | 2 +- ...tImmediateMessage_Success.OSX.verified.txt | 2 +- ...ediateMessage_Success.Windows.verified.txt | 2 +- ...arningMessage_Succeeded.Linux.verified.txt | 4 +- ...eWarningMessage_Succeeded.OSX.verified.txt | 4 +- ...ningMessage_Succeeded.Windows.verified.txt | 4 +- ...sts.PrintRestore_Failed.Linux.verified.txt | 4 +- ...Tests.PrintRestore_Failed.OSX.verified.txt | 2 +- ...s.PrintRestore_Failed.Windows.verified.txt | 4 +- ...ore_SuccessWithWarnings.Linux.verified.txt | 4 +- ...store_SuccessWithWarnings.OSX.verified.txt | 2 +- ...e_SuccessWithWarnings.Windows.verified.txt | 4 +- ...sBuildSummary_Succeeded.Linux.verified.txt | 2 +- ...ntsBuildSummary_Succeeded.OSX.verified.txt | 2 +- ...uildSummary_Succeeded.Windows.verified.txt | 2 +- src/MSBuild.UnitTests/TerminalLogger_Tests.cs | 58 +++++++++++++----- src/MSBuild/TerminalLogger/NodeStatus.cs | 6 +- src/MSBuild/TerminalLogger/NodesFrame.cs | 20 +++--- src/MSBuild/TerminalLogger/Project.cs | 14 ++++- .../TerminalLogger/StopwatchAbstraction.cs | 12 ++++ src/MSBuild/TerminalLogger/SystemStopwatch.cs | 24 ++++++++ src/MSBuild/TerminalLogger/TerminalLogger.cs | 6 +- 46 files changed, 274 insertions(+), 88 deletions(-) create mode 100644 src/MSBuild.UnitTests/MockStopwatch.cs create mode 100644 src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesOverwritesTime.Linux.verified.txt create mode 100644 src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesOverwritesTime.OSX.verified.txt create mode 100644 src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesOverwritesTime.Windows.verified.txt create mode 100644 src/MSBuild/TerminalLogger/StopwatchAbstraction.cs create mode 100644 src/MSBuild/TerminalLogger/SystemStopwatch.cs diff --git a/.vsts-dotnet-ci.yml b/.vsts-dotnet-ci.yml index d538f655a85..922df9717a7 100644 --- a/.vsts-dotnet-ci.yml +++ b/.vsts-dotnet-ci.yml @@ -35,6 +35,11 @@ jobs: mergeTestResults: true continueOnError: true condition: always() + - task: CmdLine@2 + displayName: 'Set flag to publish Verify *.received.* files when test step fails' + condition: failed() + inputs: + script: 'echo "##vso[task.setvariable variable=publishverify]Yes"' - task: PublishBuildArtifacts@1 displayName: 'Publish Artifact: logs' inputs: @@ -49,6 +54,22 @@ jobs: ArtifactName: 'FullOnWindows test logs' continueOnError: true condition: always() + - task: CopyFiles@2 + condition: eq(variables['publishverify'], 'Yes') + displayName: 'Copy Verify *.received.* files to Artifact Staging' + inputs: + contents: '**\*.received.*' + targetFolder: '$(Build.ArtifactStagingDirectory)\Verify' + cleanTargetFolder: true + overWrite: true + - task: PublishBuildArtifacts@1 + displayName: 'Publish Verify *.received.* files as Artifacts' + name: 'verifypublish' + condition: eq(variables['publishverify'], 'Yes') + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\Verify' + ArtifactName: 'Windows-on-full Verify $(System.JobAttempt)' + - job: BootstrapMSBuildOnCoreWindows displayName: "Windows Core" @@ -185,6 +206,11 @@ jobs: mergeTestResults: true continueOnError: true condition: always() + - task: CmdLine@2 + displayName: 'Set flag to publish Verify *.received.* files when test step fails' + condition: failed() + inputs: + script: 'echo "##vso[task.setvariable variable=publishverify]Yes"' - task: PublishBuildArtifacts@1 displayName: 'Publish Artifact: logs' inputs: @@ -199,6 +225,21 @@ jobs: ArtifactName: 'CoreOnLinux test logs' continueOnError: true condition: always() + - task: CopyFiles@2 + condition: eq(variables['publishverify'], 'Yes') + displayName: 'Copy Verify *.received.* files to Artifact Staging' + inputs: + contents: '**/*.received.*' + targetFolder: '$(Build.ArtifactStagingDirectory)/Verify' + cleanTargetFolder: true + overWrite: true + - task: PublishBuildArtifacts@1 + displayName: 'Publish Verify *.received.* files as Artifacts' + name: 'verifypublish' + condition: eq(variables['publishverify'], 'Yes') + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)/Verify' + ArtifactName: 'Linux Verify $(System.JobAttempt)' - job: CoreOnMac displayName: "macOS Core" @@ -219,6 +260,11 @@ jobs: mergeTestResults: true continueOnError: true condition: always() + - task: CmdLine@2 + displayName: 'Set flag to publish Verify *.received.* files when test step fails' + condition: failed() + inputs: + script: 'echo "##vso[task.setvariable variable=publishverify]Yes"' - task: PublishBuildArtifacts@1 displayName: 'Publish Artifact: logs' inputs: @@ -233,5 +279,20 @@ jobs: ArtifactName: 'CoreOnMac test logs' continueOnError: true condition: always() + - task: CopyFiles@2 + condition: eq(variables['publishverify'], 'Yes') + displayName: 'Copy Verify *.received.* files to Artifact Staging' + inputs: + contents: '**/*.received.*' + targetFolder: '$(Build.ArtifactStagingDirectory)/Verify' + cleanTargetFolder: true + overWrite: true + - task: PublishBuildArtifacts@1 + displayName: 'Publish Verify *.received.* files as Artifacts' + name: 'verifypublish' + condition: eq(variables['publishverify'], 'Yes') + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)/Verify' + ArtifactName: 'macOS Verify $(System.JobAttempt)' - template: /eng/common/templates/jobs/source-build.yml diff --git a/src/MSBuild.UnitTests/MockStopwatch.cs b/src/MSBuild.UnitTests/MockStopwatch.cs new file mode 100644 index 00000000000..8c65821140f --- /dev/null +++ b/src/MSBuild.UnitTests/MockStopwatch.cs @@ -0,0 +1,34 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.Build.Logging.TerminalLogger; + +namespace Microsoft.Build.CommandLine.UnitTests; + +internal sealed class MockStopwatch : StopwatchAbstraction +{ + public override double ElapsedSeconds + { + get + { + return _elapsed; + } + } + + public override void Start() + { + IsStarted = true; + Tick(); + } + + public override void Stop() => IsStarted = false; + + public bool IsStarted { get; private set; } + + private double _elapsed = 0d; + + public void Tick(double seconds = 0.1) + { + _elapsed += seconds; + } +} diff --git a/src/MSBuild.UnitTests/NodeStatus_Tests.cs b/src/MSBuild.UnitTests/NodeStatus_Tests.cs index 50ae7b38a51..42e821c4ae6 100644 --- a/src/MSBuild.UnitTests/NodeStatus_Tests.cs +++ b/src/MSBuild.UnitTests/NodeStatus_Tests.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System; @@ -21,7 +21,7 @@ namespace Microsoft.Build.CommandLine.UnitTests; [UsesVerify] public class NodeStatus_Tests { - private readonly NodeStatus _status = new("Namespace.Project", "TargetFramework", "Target", new()); + private readonly NodeStatus _status = new("Namespace.Project", "TargetFramework", "Target", new MockStopwatch()); public NodeStatus_Tests() { @@ -31,32 +31,32 @@ public NodeStatus_Tests() [Fact] public async Task EverythingFits() { - NodesFrame frame = new(new[] { _status }, width: 80, height: 5); + NodesFrame frame = new([_status], width: 80, height: 5); - await Verify(frame.RenderNodeStatus(_status).ToString()); + await Verify(frame.RenderNodeStatus(0).ToString()); } [Fact] public async Task TargetIsTruncatedFirst() { - NodesFrame frame = new(new[] { _status }, width: 45, height: 5); + NodesFrame frame = new([_status], width: 45, height: 5); - await Verify(frame.RenderNodeStatus(_status).ToString()); + await Verify(frame.RenderNodeStatus(0).ToString()); } [Fact] public async Task NamespaceIsTruncatedNext() { - NodesFrame frame = new(new[] { _status }, width: 40, height: 5); + NodesFrame frame = new([_status], width: 40, height: 5); - await Verify(frame.RenderNodeStatus(_status).ToString()); + await Verify(frame.RenderNodeStatus(0).ToString()); } [Fact] public async Task GoesToProject() { - NodesFrame frame = new(new[] { _status }, width: 10, height: 5); + NodesFrame frame = new([_status], width: 10, height: 5); - await Verify(frame.RenderNodeStatus(_status).ToString()); + await Verify(frame.RenderNodeStatus(0).ToString()); } } diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesOverwritesTime.Linux.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesOverwritesTime.Linux.verified.txt new file mode 100644 index 00000000000..2e9f63be66c --- /dev/null +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesOverwritesTime.Linux.verified.txt @@ -0,0 +1,3 @@ +]9;4;3;\[?25l + project Build (111.2s) +[?25h \ No newline at end of file diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesOverwritesTime.OSX.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesOverwritesTime.OSX.verified.txt new file mode 100644 index 00000000000..dc43e217d65 --- /dev/null +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesOverwritesTime.OSX.verified.txt @@ -0,0 +1,3 @@ +[?25l + project Build (111.2s) +[?25h \ No newline at end of file diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesOverwritesTime.Windows.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesOverwritesTime.Windows.verified.txt new file mode 100644 index 00000000000..2e9f63be66c --- /dev/null +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesOverwritesTime.Windows.verified.txt @@ -0,0 +1,3 @@ +]9;4;3;\[?25l + project Build (111.2s) +[?25h \ No newline at end of file diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesOverwritesWithNewTargetFramework.Linux.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesOverwritesWithNewTargetFramework.Linux.verified.txt index fe12f4e9dec..7e605333ed6 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesOverwritesWithNewTargetFramework.Linux.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesOverwritesWithNewTargetFramework.Linux.verified.txt @@ -1,5 +1,5 @@ ]9;4;3;\[?25l - project tfName Build (0.0s) + project tfName Build (0.2s) [?25h[?25l - project tf2 Build (0.0s) + project tf2 Build (0.2s) [?25h \ No newline at end of file diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesOverwritesWithNewTargetFramework.OSX.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesOverwritesWithNewTargetFramework.OSX.verified.txt index 8d078e61f5c..5018115c62a 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesOverwritesWithNewTargetFramework.OSX.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesOverwritesWithNewTargetFramework.OSX.verified.txt @@ -1,5 +1,5 @@ [?25l - project tfName Build (0.0s) + project tfName Build (0.2s) [?25h[?25l - project tf2 Build (0.0s) + project tf2 Build (0.2s) [?25h \ No newline at end of file diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesOverwritesWithNewTargetFramework.Windows.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesOverwritesWithNewTargetFramework.Windows.verified.txt index fe12f4e9dec..7e605333ed6 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesOverwritesWithNewTargetFramework.Windows.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesOverwritesWithNewTargetFramework.Windows.verified.txt @@ -1,5 +1,5 @@ ]9;4;3;\[?25l - project tfName Build (0.0s) + project tfName Build (0.2s) [?25h[?25l - project tf2 Build (0.0s) + project tf2 Build (0.2s) [?25h \ No newline at end of file diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesShowsCurrent.Linux.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesShowsCurrent.Linux.verified.txt index 1f7b782f2ef..ccfb1bac3a5 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesShowsCurrent.Linux.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesShowsCurrent.Linux.verified.txt @@ -1,3 +1,3 @@ ]9;4;3;\[?25l - project Build (0.0s) + project Build (0.2s) [?25h \ No newline at end of file diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesShowsCurrent.OSX.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesShowsCurrent.OSX.verified.txt index 143745dea40..c671e994c3e 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesShowsCurrent.OSX.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesShowsCurrent.OSX.verified.txt @@ -1,3 +1,3 @@ [?25l - project Build (0.0s) + project Build (0.2s) [?25h \ No newline at end of file diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesShowsCurrent.Windows.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesShowsCurrent.Windows.verified.txt index 1f7b782f2ef..ccfb1bac3a5 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesShowsCurrent.Windows.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesShowsCurrent.Windows.verified.txt @@ -1,3 +1,3 @@ ]9;4;3;\[?25l - project Build (0.0s) + project Build (0.2s) [?25h \ No newline at end of file diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_Failed.Linux.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_Failed.Linux.verified.txt index e397b179c6b..b863cb67194 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_Failed.Linux.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_Failed.Linux.verified.txt @@ -1,4 +1,4 @@ ]9;4;3;\[?25l [?25h -Build failed in 0.0s +Build failed in 5.0s ]9;4;0;\ \ No newline at end of file diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_Failed.OSX.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_Failed.OSX.verified.txt index 5dac0df45b6..c36142ab71a 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_Failed.OSX.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_Failed.OSX.verified.txt @@ -1,3 +1,3 @@ [?25l [?25h -Build failed in 0.0s +Build failed in 5.0s diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_Failed.Windows.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_Failed.Windows.verified.txt index e397b179c6b..b863cb67194 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_Failed.Windows.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_Failed.Windows.verified.txt @@ -1,4 +1,4 @@ ]9;4;3;\[?25l [?25h -Build failed in 0.0s +Build failed in 5.0s ]9;4;0;\ \ No newline at end of file diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_FailedWithErrors.Linux.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_FailedWithErrors.Linux.verified.txt index 0041a7257fe..11e72f94fbf 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_FailedWithErrors.Linux.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_FailedWithErrors.Linux.verified.txt @@ -1,6 +1,6 @@ -]9;4;3;\ project failed with errors (0.0s) +]9;4;3;\ project failed with errors (0.2s) directory/file(1,2,3,4): error AA0000: Error! [?25l [?25h -Build failed with errors in 0.0s +Build failed with errors in 5.0s ]9;4;0;\ \ No newline at end of file diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_FailedWithErrors.OSX.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_FailedWithErrors.OSX.verified.txt index cf0d8f1d6c9..bc476784fbb 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_FailedWithErrors.OSX.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_FailedWithErrors.OSX.verified.txt @@ -1,5 +1,5 @@ - project failed with errors (0.0s) + project failed with errors (0.2s) directory/file(1,2,3,4): error AA0000: Error! [?25l [?25h -Build failed with errors in 0.0s +Build failed with errors in 5.0s diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_FailedWithErrors.Windows.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_FailedWithErrors.Windows.verified.txt index 0041a7257fe..11e72f94fbf 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_FailedWithErrors.Windows.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_FailedWithErrors.Windows.verified.txt @@ -1,6 +1,6 @@ -]9;4;3;\ project failed with errors (0.0s) +]9;4;3;\ project failed with errors (0.2s) directory/file(1,2,3,4): error AA0000: Error! [?25l [?25h -Build failed with errors in 0.0s +Build failed with errors in 5.0s ]9;4;0;\ \ No newline at end of file diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_SucceededWithWarnings.Linux.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_SucceededWithWarnings.Linux.verified.txt index 86c02fdb8df..aeec26abf26 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_SucceededWithWarnings.Linux.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_SucceededWithWarnings.Linux.verified.txt @@ -1,6 +1,6 @@ -]9;4;3;\ project succeeded with warnings (0.0s) +]9;4;3;\ project succeeded with warnings (0.2s) directory/file(1,2,3,4): warning AA0000: Warning! [?25l [?25h -Build succeeded with warnings in 0.0s +Build succeeded with warnings in 5.0s ]9;4;0;\ \ No newline at end of file diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_SucceededWithWarnings.OSX.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_SucceededWithWarnings.OSX.verified.txt index 43510237153..3b6fcaf238d 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_SucceededWithWarnings.OSX.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_SucceededWithWarnings.OSX.verified.txt @@ -1,5 +1,5 @@ - project succeeded with warnings (0.0s) + project succeeded with warnings (0.2s) directory/file(1,2,3,4): warning AA0000: Warning! [?25l [?25h -Build succeeded with warnings in 0.0s +Build succeeded with warnings in 5.0s diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_SucceededWithWarnings.Windows.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_SucceededWithWarnings.Windows.verified.txt index 86c02fdb8df..aeec26abf26 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_SucceededWithWarnings.Windows.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintBuildSummary_SucceededWithWarnings.Windows.verified.txt @@ -1,6 +1,6 @@ -]9;4;3;\ project succeeded with warnings (0.0s) +]9;4;3;\ project succeeded with warnings (0.2s) directory/file(1,2,3,4): warning AA0000: Warning! [?25l [?25h -Build succeeded with warnings in 0.0s +Build succeeded with warnings in 5.0s ]9;4;0;\ \ No newline at end of file diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateMessage_Skipped.Linux.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateMessage_Skipped.Linux.verified.txt index e6169b4e163..d5e6b72e894 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateMessage_Skipped.Linux.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateMessage_Skipped.Linux.verified.txt @@ -1,4 +1,4 @@ ]9;4;3;\[?25l [?25h -Build succeeded in 0.0s +Build succeeded in 5.0s ]9;4;0;\ \ No newline at end of file diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateMessage_Skipped.OSX.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateMessage_Skipped.OSX.verified.txt index de2ebf4c55e..4d414bf90bf 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateMessage_Skipped.OSX.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateMessage_Skipped.OSX.verified.txt @@ -1,3 +1,3 @@ [?25l [?25h -Build succeeded in 0.0s +Build succeeded in 5.0s diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateMessage_Skipped.Windows.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateMessage_Skipped.Windows.verified.txt index e6169b4e163..d5e6b72e894 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateMessage_Skipped.Windows.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateMessage_Skipped.Windows.verified.txt @@ -1,4 +1,4 @@ ]9;4;3;\[?25l [?25h -Build succeeded in 0.0s +Build succeeded in 5.0s ]9;4;0;\ \ No newline at end of file diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateMessage_Success.Linux.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateMessage_Success.Linux.verified.txt index 86eed92792e..75842281bfb 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateMessage_Success.Linux.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateMessage_Success.Linux.verified.txt @@ -1,5 +1,5 @@ ]9;4;3;\The plugin credential provider could not acquire credentials.Authentication may require manual action. Consider re-running the command with --interactive for `dotnet`, /p:NuGetInteractive="true" for MSBuild or removing the -NonInteractive switch for `NuGet` [?25l [?25h -Build succeeded in 0.0s +Build succeeded in 5.0s ]9;4;0;\ \ No newline at end of file diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateMessage_Success.OSX.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateMessage_Success.OSX.verified.txt index acf188a70ce..1e10e7fc988 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateMessage_Success.OSX.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateMessage_Success.OSX.verified.txt @@ -1,4 +1,4 @@ The plugin credential provider could not acquire credentials.Authentication may require manual action. Consider re-running the command with --interactive for `dotnet`, /p:NuGetInteractive="true" for MSBuild or removing the -NonInteractive switch for `NuGet` [?25l [?25h -Build succeeded in 0.0s +Build succeeded in 5.0s diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateMessage_Success.Windows.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateMessage_Success.Windows.verified.txt index 86eed92792e..75842281bfb 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateMessage_Success.Windows.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateMessage_Success.Windows.verified.txt @@ -1,5 +1,5 @@ ]9;4;3;\The plugin credential provider could not acquire credentials.Authentication may require manual action. Consider re-running the command with --interactive for `dotnet`, /p:NuGetInteractive="true" for MSBuild or removing the -NonInteractive switch for `NuGet` [?25l [?25h -Build succeeded in 0.0s +Build succeeded in 5.0s ]9;4;0;\ \ No newline at end of file diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateWarningMessage_Succeeded.Linux.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateWarningMessage_Succeeded.Linux.verified.txt index d3967bfd576..512b5b78d7e 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateWarningMessage_Succeeded.Linux.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateWarningMessage_Succeeded.Linux.verified.txt @@ -1,9 +1,9 @@ ]9;4;3;\directory/file(1,2,3,4): warning AA0000: [CredentialProvider]DeviceFlow: https://testfeed/index.json directory/file(1,2,3,4): warning AA0000: [CredentialProvider]ATTENTION: User interaction required.**********************************************************************To sign in, use a web browser to open the page https://devicelogin and enter the code XXXXXX to authenticate.********************************************************************** - project succeeded with warnings (0.0s) + project succeeded with warnings (0.2s) directory/file(1,2,3,4): warning AA0000: [CredentialProvider]DeviceFlow: https://testfeed/index.json directory/file(1,2,3,4): warning AA0000: [CredentialProvider]ATTENTION: User interaction required.**********************************************************************To sign in, use a web browser to open the page https://devicelogin and enter the code XXXXXX to authenticate.********************************************************************** [?25l [?25h -Build succeeded with warnings in 0.0s +Build succeeded with warnings in 5.0s ]9;4;0;\ \ No newline at end of file diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateWarningMessage_Succeeded.OSX.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateWarningMessage_Succeeded.OSX.verified.txt index 42c777b8c11..0b5a2d831c1 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateWarningMessage_Succeeded.OSX.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateWarningMessage_Succeeded.OSX.verified.txt @@ -1,8 +1,8 @@ directory/file(1,2,3,4): warning AA0000: [CredentialProvider]DeviceFlow: https://testfeed/index.json directory/file(1,2,3,4): warning AA0000: [CredentialProvider]ATTENTION: User interaction required.**********************************************************************To sign in, use a web browser to open the page https://devicelogin and enter the code XXXXXX to authenticate.********************************************************************** - project succeeded with warnings (0.0s) + project succeeded with warnings (0.2s) directory/file(1,2,3,4): warning AA0000: [CredentialProvider]DeviceFlow: https://testfeed/index.json directory/file(1,2,3,4): warning AA0000: [CredentialProvider]ATTENTION: User interaction required.**********************************************************************To sign in, use a web browser to open the page https://devicelogin and enter the code XXXXXX to authenticate.********************************************************************** [?25l [?25h -Build succeeded with warnings in 0.0s +Build succeeded with warnings in 5.0s diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateWarningMessage_Succeeded.Windows.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateWarningMessage_Succeeded.Windows.verified.txt index d3967bfd576..512b5b78d7e 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateWarningMessage_Succeeded.Windows.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintImmediateWarningMessage_Succeeded.Windows.verified.txt @@ -1,9 +1,9 @@ ]9;4;3;\directory/file(1,2,3,4): warning AA0000: [CredentialProvider]DeviceFlow: https://testfeed/index.json directory/file(1,2,3,4): warning AA0000: [CredentialProvider]ATTENTION: User interaction required.**********************************************************************To sign in, use a web browser to open the page https://devicelogin and enter the code XXXXXX to authenticate.********************************************************************** - project succeeded with warnings (0.0s) + project succeeded with warnings (0.2s) directory/file(1,2,3,4): warning AA0000: [CredentialProvider]DeviceFlow: https://testfeed/index.json directory/file(1,2,3,4): warning AA0000: [CredentialProvider]ATTENTION: User interaction required.**********************************************************************To sign in, use a web browser to open the page https://devicelogin and enter the code XXXXXX to authenticate.********************************************************************** [?25l [?25h -Build succeeded with warnings in 0.0s +Build succeeded with warnings in 5.0s ]9;4;0;\ \ No newline at end of file diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintRestore_Failed.Linux.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintRestore_Failed.Linux.verified.txt index 1df7926cf3f..fde469843b0 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintRestore_Failed.Linux.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintRestore_Failed.Linux.verified.txt @@ -1,4 +1,4 @@ -directory/file(1,2,3,4): error AA0000: Restore Failed +]9;4;3;\directory/file(1,2,3,4): error AA0000: Restore Failed -Build failed with errors in 0.0s +Build failed with errors in 5.0s ]9;4;0;\ \ No newline at end of file diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintRestore_Failed.OSX.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintRestore_Failed.OSX.verified.txt index c4d47333679..f912378dc48 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintRestore_Failed.OSX.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintRestore_Failed.OSX.verified.txt @@ -1,3 +1,3 @@ directory/file(1,2,3,4): error AA0000: Restore Failed -Build failed with errors in 0.0s +Build failed with errors in 5.0s diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintRestore_Failed.Windows.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintRestore_Failed.Windows.verified.txt index 1df7926cf3f..fde469843b0 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintRestore_Failed.Windows.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintRestore_Failed.Windows.verified.txt @@ -1,4 +1,4 @@ -directory/file(1,2,3,4): error AA0000: Restore Failed +]9;4;3;\directory/file(1,2,3,4): error AA0000: Restore Failed -Build failed with errors in 0.0s +Build failed with errors in 5.0s ]9;4;0;\ \ No newline at end of file diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintRestore_SuccessWithWarnings.Linux.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintRestore_SuccessWithWarnings.Linux.verified.txt index bc7006945a4..927084af0f3 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintRestore_SuccessWithWarnings.Linux.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintRestore_SuccessWithWarnings.Linux.verified.txt @@ -1,4 +1,4 @@ -directory/file(1,2,3,4): warning AA0000: Restore with Warning +]9;4;3;\directory/file(1,2,3,4): warning AA0000: Restore with Warning -Build succeeded with warnings in 0.0s +Build succeeded with warnings in 5.0s ]9;4;0;\ \ No newline at end of file diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintRestore_SuccessWithWarnings.OSX.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintRestore_SuccessWithWarnings.OSX.verified.txt index 8756e2b3be2..430fce9be26 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintRestore_SuccessWithWarnings.OSX.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintRestore_SuccessWithWarnings.OSX.verified.txt @@ -1,3 +1,3 @@ directory/file(1,2,3,4): warning AA0000: Restore with Warning -Build succeeded with warnings in 0.0s +Build succeeded with warnings in 5.0s diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintRestore_SuccessWithWarnings.Windows.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintRestore_SuccessWithWarnings.Windows.verified.txt index bc7006945a4..927084af0f3 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintRestore_SuccessWithWarnings.Windows.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintRestore_SuccessWithWarnings.Windows.verified.txt @@ -1,4 +1,4 @@ -directory/file(1,2,3,4): warning AA0000: Restore with Warning +]9;4;3;\directory/file(1,2,3,4): warning AA0000: Restore with Warning -Build succeeded with warnings in 0.0s +Build succeeded with warnings in 5.0s ]9;4;0;\ \ No newline at end of file diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintsBuildSummary_Succeeded.Linux.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintsBuildSummary_Succeeded.Linux.verified.txt index e6169b4e163..d5e6b72e894 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintsBuildSummary_Succeeded.Linux.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintsBuildSummary_Succeeded.Linux.verified.txt @@ -1,4 +1,4 @@ ]9;4;3;\[?25l [?25h -Build succeeded in 0.0s +Build succeeded in 5.0s ]9;4;0;\ \ No newline at end of file diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintsBuildSummary_Succeeded.OSX.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintsBuildSummary_Succeeded.OSX.verified.txt index de2ebf4c55e..4d414bf90bf 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintsBuildSummary_Succeeded.OSX.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintsBuildSummary_Succeeded.OSX.verified.txt @@ -1,3 +1,3 @@ [?25l [?25h -Build succeeded in 0.0s +Build succeeded in 5.0s diff --git a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintsBuildSummary_Succeeded.Windows.verified.txt b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintsBuildSummary_Succeeded.Windows.verified.txt index e6169b4e163..d5e6b72e894 100644 --- a/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintsBuildSummary_Succeeded.Windows.verified.txt +++ b/src/MSBuild.UnitTests/Snapshots/TerminalLogger_Tests.PrintsBuildSummary_Succeeded.Windows.verified.txt @@ -1,4 +1,4 @@ ]9;4;3;\[?25l [?25h -Build succeeded in 0.0s +Build succeeded in 5.0s ]9;4;0;\ \ No newline at end of file diff --git a/src/MSBuild.UnitTests/TerminalLogger_Tests.cs b/src/MSBuild.UnitTests/TerminalLogger_Tests.cs index 9d764455e9a..80353d7ab31 100644 --- a/src/MSBuild.UnitTests/TerminalLogger_Tests.cs +++ b/src/MSBuild.UnitTests/TerminalLogger_Tests.cs @@ -11,6 +11,7 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.Build.BackEnd.Logging; +using Microsoft.Build.CommandLine.UnitTests; using Microsoft.Build.Evaluation; using Microsoft.Build.Framework; using Microsoft.Build.Logging; @@ -41,8 +42,6 @@ public class TerminalLogger_Tests : IEventSource, IDisposable private VerifySettings _settings = new(); - private static Regex s_elapsedTime = new($@"\d+{Regex.Escape(CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator)}\ds", RegexOptions.Compiled); - public TerminalLogger_Tests() { _mockTerminal = new Terminal(_outputWriter); @@ -50,17 +49,9 @@ public TerminalLogger_Tests() _terminallogger.Initialize(this, _nodeCount); - UseProjectRelativeDirectory("Snapshots"); + _terminallogger.CreateStopwatch = () => new MockStopwatch(); - // Scrub timestamps on intermediate execution lines, - // which are subject to the vagaries of the test machine - // and OS scheduler. - _settings.AddScrubber(static lineBuilder => - { - string line = lineBuilder.ToString(); - lineBuilder.Clear(); - lineBuilder.Append(s_elapsedTime.Replace(line, "0.0s")); - }); + UseProjectRelativeDirectory("Snapshots"); } #region IEventSource implementation @@ -209,8 +200,6 @@ private void InvokeLoggerCallbacksForSimpleProject(bool succeeded, Action additi additionalCallbacks(); - Thread.Sleep(1_000); - TaskFinished?.Invoke(_eventSender, MakeTaskFinishedEventArgs(_projectFile, "Task", succeeded)); TargetFinished?.Invoke(_eventSender, MakeTargetFinishedEventArgs(_projectFile, "Build", succeeded)); @@ -281,6 +270,8 @@ public Task PrintImmediateMessage_Skipped() [Fact] public Task PrintRestore_Failed() { + BuildStarted?.Invoke(_eventSender, MakeBuildStartedEventArgs()); + bool succeeded = false; ErrorRaised?.Invoke(_eventSender, MakeErrorEventArgs("Restore Failed")); @@ -293,6 +284,8 @@ public Task PrintRestore_Failed() [Fact] public Task PrintRestore_SuccessWithWarnings() { + BuildStarted?.Invoke(_eventSender, MakeBuildStartedEventArgs()); + bool succeeded = true; WarningRaised?.Invoke(_eventSender, MakeWarningEventArgs("Restore with Warning")); @@ -333,6 +326,43 @@ public void DisplayNodesShowsCurrent() }); } + [Fact] + public void DisplayNodesOverwritesTime() + { + List stopwatches = new(); + + Func? createStopwatch = _terminallogger.CreateStopwatch; + + try + { + _terminallogger.CreateStopwatch = () => + { + MockStopwatch stopwatch = new(); + stopwatches.Add(stopwatch); + return stopwatch; + }; + + InvokeLoggerCallbacksForSimpleProject(succeeded: false, async () => + { + foreach (var stopwatch in stopwatches) + { + // Tick time forward by at least 10 seconds, + // as a regression test for https://github.com/dotnet/msbuild/issues/9562 + stopwatch.Tick(111.0); + } + + _terminallogger.DisplayNodes(); + + await Verify(_outputWriter.ToString(), _settings).UniqueForOSPlatform(); + }); + } + finally + { + _terminallogger.CreateStopwatch = createStopwatch; + } + } + + [Fact] public async Task DisplayNodesOverwritesWithNewTargetFramework() { diff --git a/src/MSBuild/TerminalLogger/NodeStatus.cs b/src/MSBuild/TerminalLogger/NodeStatus.cs index c82a3d106d7..d199edc461c 100644 --- a/src/MSBuild/TerminalLogger/NodeStatus.cs +++ b/src/MSBuild/TerminalLogger/NodeStatus.cs @@ -14,9 +14,9 @@ internal class NodeStatus public string Project { get; } public string? TargetFramework { get; } public string Target { get; } - public Stopwatch Stopwatch { get; } + public StopwatchAbstraction Stopwatch { get; } - public NodeStatus(string project, string? targetFramework, string target, Stopwatch stopwatch) + public NodeStatus(string project, string? targetFramework, string target, StopwatchAbstraction stopwatch) { Project = project; TargetFramework = targetFramework; @@ -35,7 +35,7 @@ obj is NodeStatus status && public override string ToString() { - string duration = Stopwatch.Elapsed.TotalSeconds.ToString("F1"); + string duration = Stopwatch.ElapsedSeconds.ToString("F1"); return string.IsNullOrEmpty(TargetFramework) ? string.Format("{0}{1} {2} ({3}s)", diff --git a/src/MSBuild/TerminalLogger/NodesFrame.cs b/src/MSBuild/TerminalLogger/NodesFrame.cs index 144288950fa..33fbf2c8d42 100644 --- a/src/MSBuild/TerminalLogger/NodesFrame.cs +++ b/src/MSBuild/TerminalLogger/NodesFrame.cs @@ -16,7 +16,7 @@ internal sealed class NodesFrame { private const int MaxColumn = 120; - private readonly NodeStatus[] _nodes; + private readonly (NodeStatus nodeStatus, int durationLength)[] _nodes; private readonly StringBuilder _renderBuilder = new(); @@ -29,22 +29,26 @@ public NodesFrame(NodeStatus?[] nodes, int width, int height) Width = Math.Min(width, MaxColumn); Height = height; - _nodes = new NodeStatus[nodes.Length]; + _nodes = new (NodeStatus, int)[nodes.Length]; foreach (NodeStatus? status in nodes) { if (status is not null) { - _nodes[NodesCount++] = status; + _nodes[NodesCount++].nodeStatus = status; } } } - internal ReadOnlySpan RenderNodeStatus(NodeStatus status) + internal ReadOnlySpan RenderNodeStatus(int i) { + NodeStatus status = _nodes[i].nodeStatus; + string durationString = ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword( "DurationDisplay", - status.Stopwatch.Elapsed.TotalSeconds); + status.Stopwatch.ElapsedSeconds); + + _nodes[i].durationLength = durationString.Length; string project = status.Project; string? targetFramework = status.TargetFramework; @@ -91,15 +95,15 @@ public string Render(NodesFrame previousFrame) int i = 0; for (; i < NodesCount; i++) { - ReadOnlySpan needed = RenderNodeStatus(_nodes[i]); + ReadOnlySpan needed = RenderNodeStatus(i); // Do we have previous node string to compare with? if (previousFrame.NodesCount > i) { if (previousFrame._nodes[i] == _nodes[i]) { - // Same everything except time - string durationString = ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("DurationDisplay", _nodes[i].Stopwatch.Elapsed.TotalSeconds); + // Same everything except time, AND same number of digits in time + string durationString = ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("DurationDisplay", _nodes[i].nodeStatus.Stopwatch.ElapsedSeconds); sb.Append($"{AnsiCodes.SetCursorHorizontal(MaxColumn)}{AnsiCodes.MoveCursorBackward(durationString.Length)}{durationString}"); } else diff --git a/src/MSBuild/TerminalLogger/Project.cs b/src/MSBuild/TerminalLogger/Project.cs index 5ed03039bcc..3f027249782 100644 --- a/src/MSBuild/TerminalLogger/Project.cs +++ b/src/MSBuild/TerminalLogger/Project.cs @@ -16,15 +16,25 @@ internal sealed class Project /// Initialized a new with the given . /// /// The target framework of the project or null if not multi-targeting. - public Project(string? targetFramework) + public Project(string? targetFramework, StopwatchAbstraction? stopwatch) { TargetFramework = targetFramework; + + if (stopwatch is not null) + { + stopwatch.Start(); + Stopwatch = stopwatch; + } + else + { + Stopwatch = SystemStopwatch.StartNew(); + } } /// /// A stopwatch to time the build of the project. /// - public Stopwatch Stopwatch { get; } = Stopwatch.StartNew(); + public StopwatchAbstraction Stopwatch { get; } /// /// Full path to the primary output of the project, if known. diff --git a/src/MSBuild/TerminalLogger/StopwatchAbstraction.cs b/src/MSBuild/TerminalLogger/StopwatchAbstraction.cs new file mode 100644 index 00000000000..8b365517a6a --- /dev/null +++ b/src/MSBuild/TerminalLogger/StopwatchAbstraction.cs @@ -0,0 +1,12 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace Microsoft.Build.Logging.TerminalLogger; + +internal abstract class StopwatchAbstraction +{ + public abstract void Start(); + public abstract void Stop(); + + public abstract double ElapsedSeconds { get; } +} diff --git a/src/MSBuild/TerminalLogger/SystemStopwatch.cs b/src/MSBuild/TerminalLogger/SystemStopwatch.cs new file mode 100644 index 00000000000..2f03092971c --- /dev/null +++ b/src/MSBuild/TerminalLogger/SystemStopwatch.cs @@ -0,0 +1,24 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Diagnostics; + +namespace Microsoft.Build.Logging.TerminalLogger; + +internal sealed class SystemStopwatch : StopwatchAbstraction +{ + private Stopwatch _stopwatch = new (); + + public override double ElapsedSeconds => _stopwatch.Elapsed.TotalSeconds; + + public override void Start() => _stopwatch.Start(); + public override void Stop() => _stopwatch.Stop(); + + public static StopwatchAbstraction StartNew() + { + SystemStopwatch wallClockStopwatch = new(); + wallClockStopwatch.Start(); + + return wallClockStopwatch; + } +} diff --git a/src/MSBuild/TerminalLogger/TerminalLogger.cs b/src/MSBuild/TerminalLogger/TerminalLogger.cs index 221d6e4e4fa..f317fd6c1b8 100644 --- a/src/MSBuild/TerminalLogger/TerminalLogger.cs +++ b/src/MSBuild/TerminalLogger/TerminalLogger.cs @@ -57,6 +57,8 @@ public ProjectContext(BuildEventContext context) internal const TerminalColor TargetFrameworkColor = TerminalColor.Cyan; + internal Func? CreateStopwatch = null; + /// /// Protects access to state shared between the logger callbacks and the rendering thread. /// @@ -318,7 +320,7 @@ private void ProjectStarted(object sender, ProjectStartedEventArgs e) { targetFramework = null; } - _projects[c] = new(targetFramework); + _projects[c] = new(targetFramework, CreateStopwatch?.Invoke()); // First ever restore in the build is starting. if (e.TargetNames == "Restore" && !_restoreFinished) @@ -358,7 +360,7 @@ private void ProjectFinished(object sender, ProjectFinishedEventArgs e) { EraseNodes(); - string duration = project.Stopwatch.Elapsed.TotalSeconds.ToString("F1"); + string duration = project.Stopwatch.ElapsedSeconds.ToString("F1"); ReadOnlyMemory? outputPath = project.OutputPath; string projectFile = e.ProjectFile is not null ? From a15b2dfb6b2b33393604e6ce517a3dcf331b34c8 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 21 Dec 2023 11:00:20 +0100 Subject: [PATCH 10/12] [vs17.9] Update dependencies from nuget/nuget.client dotnet/roslyn (#9557) * Update dependencies from https://github.com/nuget/nuget.client build 6.9.0.64 NuGet.Build.Tasks From Version 6.9.0-preview.1.50 -> To Version 6.9.0-preview.1.64 * Update dependencies from https://github.com/dotnet/roslyn build 20231215.7 Microsoft.Net.Compilers.Toolset From Version 4.9.0-3.23608.9 -> To Version 4.9.0-3.23615.7 --------- Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 68fb13bcf36..2f5ec2009c7 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -76,13 +76,13 @@ 73f0850939d96131c28cf6ea6ee5aacb4da0083a - + https://github.com/nuget/nuget.client - a59e64507383b64bcfbe9bf63b34aca946ab0da9 + 2a234707a663f731e4de93cba4014ed1a8259def - + https://github.com/dotnet/roslyn - 8e4ab418a8f9703f7dfe3a66adc9b3876ef9382f + 6a1cfc22d6b40c4e0fe5ac98a77a251c987a7c51 diff --git a/eng/Versions.props b/eng/Versions.props index 708ff0cadb1..766faf29449 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -52,8 +52,8 @@ 8.0.0-beta.23580.1 7.0.0 6.0.0 - 4.9.0-3.23608.9 - 6.9.0-preview.1.50 + 4.9.0-3.23615.7 + 6.9.0-preview.1.64 6.0.0 8.0.0 From ec32bc2435e391469751e0a76e39bc1d56e5bd7b Mon Sep 17 00:00:00 2001 From: dotnet bot Date: Thu, 21 Dec 2023 11:17:25 +0100 Subject: [PATCH 11/12] Localized file check-in by OneLocBuild Task: Build definition ID 9434: Build ID 8812032 (#9495) * Localized file check-in by OneLocBuild Task: Build definition ID 9434: Build ID 8767374 * Localized file check-in by OneLocBuild Task: Build definition ID 9434: Build ID 8767374 * Localized file check-in by OneLocBuild Task: Build definition ID 9434: Build ID 8801027 * Localized file check-in by OneLocBuild Task: Build definition ID 9434: Build ID 8801027 * Localized file check-in by OneLocBuild Task: Build definition ID 9434: Build ID 8805704 * Localized file check-in by OneLocBuild Task: Build definition ID 9434: Build ID 8806682 * Localized file check-in by OneLocBuild Task: Build definition ID 9434: Build ID 8806775 * Localized file check-in by OneLocBuild Task: Build definition ID 9434: Build ID 8806775 * Localized file check-in by OneLocBuild Task: Build definition ID 9434: Build ID 8812032 * Localized file check-in by OneLocBuild Task: Build definition ID 9434: Build ID 8812032 --------- Co-authored-by: AR-May <67507805+AR-May@users.noreply.github.com> --- src/Build/Resources/xlf/Strings.cs.xlf | 2 +- src/Build/Resources/xlf/Strings.de.xlf | 2 +- src/Build/Resources/xlf/Strings.fr.xlf | 2 +- src/Build/Resources/xlf/Strings.pl.xlf | 2 +- src/Build/Resources/xlf/Strings.pt-BR.xlf | 2 +- src/Build/Resources/xlf/Strings.ru.xlf | 2 +- src/Build/Resources/xlf/Strings.tr.xlf | 2 +- src/Build/Resources/xlf/Strings.zh-Hans.xlf | 2 +- src/MSBuild/Resources/xlf/Strings.cs.xlf | 52 ++++++++----------- src/MSBuild/Resources/xlf/Strings.de.xlf | 17 +++--- src/MSBuild/Resources/xlf/Strings.es.xlf | 31 +++++------ src/MSBuild/Resources/xlf/Strings.fr.xlf | 14 ++--- src/MSBuild/Resources/xlf/Strings.it.xlf | 38 +++++++------- src/MSBuild/Resources/xlf/Strings.ja.xlf | 6 +-- src/MSBuild/Resources/xlf/Strings.ko.xlf | 8 +-- src/MSBuild/Resources/xlf/Strings.pl.xlf | 31 +++++------ src/MSBuild/Resources/xlf/Strings.pt-BR.xlf | 7 +-- src/MSBuild/Resources/xlf/Strings.ru.xlf | 2 +- src/MSBuild/Resources/xlf/Strings.tr.xlf | 50 ++++++++---------- src/MSBuild/Resources/xlf/Strings.zh-Hant.xlf | 10 ++-- src/Tasks/Resources/xlf/Strings.es.xlf | 6 +-- src/Tasks/Resources/xlf/Strings.it.xlf | 4 +- 22 files changed, 134 insertions(+), 158 deletions(-) diff --git a/src/Build/Resources/xlf/Strings.cs.xlf b/src/Build/Resources/xlf/Strings.cs.xlf index bb072a16a70..93df3aa370f 100644 --- a/src/Build/Resources/xlf/Strings.cs.xlf +++ b/src/Build/Resources/xlf/Strings.cs.xlf @@ -1500,7 +1500,7 @@ Skipping because the "$(AspNetConfiguration)" configuration is not supported for this web project. You can use the AspNetConfiguration property to override the configuration used for building web projects, by adding /p:AspNetConfiguration=<value> to the command line. Currently web projects only support Debug and Release configurations. - Vynecháno, protože konfigurace $(AspNetConfiguration) není pro tento webový projekt podporována. Pomocí vlastnosti AspNetConfiguration můžete přepsat konfiguraci používanou k sestavování webových projektů, a to přidáním příkazu /p:AspNetConfiguration=<hodnota> do příkazového řádku. Webové projekty nyní podporují pouze konfigurace Debug a Release. + Vynecháno, protože konfigurace "$(AspNetConfiguration)" není pro tento webový projekt podporována. Pomocí vlastnosti AspNetConfiguration můžete přepsat konfiguraci používanou k sestavování webových projektů, a to přidáním příkazu /p:AspNetConfiguration=<hodnota> do příkazového řádku. Webové projekty nyní podporují pouze konfigurace Debug a Release. UE: This is not an error, so doesn't need an error code. LOCALIZATION: Do NOT localize "AspNetConfiguration", "Debug", "Release". diff --git a/src/Build/Resources/xlf/Strings.de.xlf b/src/Build/Resources/xlf/Strings.de.xlf index 0778e20da99..0ac225d5314 100644 --- a/src/Build/Resources/xlf/Strings.de.xlf +++ b/src/Build/Resources/xlf/Strings.de.xlf @@ -492,7 +492,7 @@ This is an unhandled exception in MSBuild -- PLEASE UPVOTE AN EXISTING ISSUE OR FILE A NEW ONE AT https://aka.ms/msbuild/unhandled {0} - Dies ist eine nicht behandelte Ausnahme in MSBuild. RUFEN SIE EIN VORHANDENES PROBLEM AUF, ODER ERSTELLEN SIE EIN NEUES UNTER https://aka.ms/msbuild/unhandled + Dies ist ein Ausnahmefehler in MSBuild. STIMMEN SIE EINEM VORHANDENEN ISSUE ZU, ODER ERSTELLEN SIE EIN NEUES ISSUE UNTER https://aka.ms/msbuild/unhandled {0} diff --git a/src/Build/Resources/xlf/Strings.fr.xlf b/src/Build/Resources/xlf/Strings.fr.xlf index 5ad4606c62a..15ca23b22a4 100644 --- a/src/Build/Resources/xlf/Strings.fr.xlf +++ b/src/Build/Resources/xlf/Strings.fr.xlf @@ -492,7 +492,7 @@ This is an unhandled exception in MSBuild -- PLEASE UPVOTE AN EXISTING ISSUE OR FILE A NEW ONE AT https://aka.ms/msbuild/unhandled {0} - Il s’agit d’une exception non gérée dans MSBuild –– VOTEZ POUR UN PROBLÈME EXISTANT OU ENTREZ UN NOUVEAU FICHIER À https://aka.ms/msbuild/unhandled. + Il s’agit d’une exception non prise en charge dans MSBuild –– VOTEZ POUR UN PROBLÈME EXISTANT OU CRÉEZ-EN UN SUR https://aka.ms/msbuild/unhandled {0} diff --git a/src/Build/Resources/xlf/Strings.pl.xlf b/src/Build/Resources/xlf/Strings.pl.xlf index 6b5cb6a8fcb..a12062ad5a9 100644 --- a/src/Build/Resources/xlf/Strings.pl.xlf +++ b/src/Build/Resources/xlf/Strings.pl.xlf @@ -492,7 +492,7 @@ This is an unhandled exception in MSBuild -- PLEASE UPVOTE AN EXISTING ISSUE OR FILE A NEW ONE AT https://aka.ms/msbuild/unhandled {0} - Jest to nieobsługiwany wyjątek w aplikacji MSBuild -- ZAGŁOSUJ NA ISTNIEJĄCY PROBLEM LUB ZAGŁOSUJ NA NOWY NA https://aka.ms/msbuild/unhandled. + Jest to nieobsługiwany wyjątek na platformie MSBuild -- ZAGŁOSUJ NA ISTNIEJĄCY PROBLEM LUB ZAREJESTRUJ NOWY W WITRYNIE https://aka.ms/msbuild/unhandled. {0} diff --git a/src/Build/Resources/xlf/Strings.pt-BR.xlf b/src/Build/Resources/xlf/Strings.pt-BR.xlf index 091ee565cc9..258fdf8c1e5 100644 --- a/src/Build/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Build/Resources/xlf/Strings.pt-BR.xlf @@ -492,7 +492,7 @@ This is an unhandled exception in MSBuild -- PLEASE UPVOTE AN EXISTING ISSUE OR FILE A NEW ONE AT https://aka.ms/msbuild/unhandled {0} - Esta é uma exceção não tratada no MSBuild -- POR FAVOR, APOIE UM PROBLEMA EXISTENTE OU ARQUIVE UM NOVO EM https://aka.ms/msbuild/unhandled + Essa é uma exceção não tratada no MSBuild -- POR FAVOR, ATUALIZE UMA QUESTÃO EXISTENTE OU ENCAMINHE UMA NOVA EM https://aka.ms/msbuild/unhandled {0} diff --git a/src/Build/Resources/xlf/Strings.ru.xlf b/src/Build/Resources/xlf/Strings.ru.xlf index 9e28c12ef8e..11007faa0ee 100644 --- a/src/Build/Resources/xlf/Strings.ru.xlf +++ b/src/Build/Resources/xlf/Strings.ru.xlf @@ -492,7 +492,7 @@ This is an unhandled exception in MSBuild -- PLEASE UPVOTE AN EXISTING ISSUE OR FILE A NEW ONE AT https://aka.ms/msbuild/unhandled {0} - Это необработанное исключение в MSBuild. Проголосуйте за существующую проблему или сообщите о новой по адресу https://aka.ms/msbuild/unhandled + Это необработанное исключение в MSBuild. ПРОГОЛОСУЙТЕ ЗА СУЩЕСТВУЮЩУЮ ПРОБЛЕМУ ИЛИ СООБЩИТЕ О НОВУЙ НА https://aka.ms/msbuild/unhandled {0} diff --git a/src/Build/Resources/xlf/Strings.tr.xlf b/src/Build/Resources/xlf/Strings.tr.xlf index ebd5bc1b6ba..b0255efe91b 100644 --- a/src/Build/Resources/xlf/Strings.tr.xlf +++ b/src/Build/Resources/xlf/Strings.tr.xlf @@ -492,7 +492,7 @@ This is an unhandled exception in MSBuild -- PLEASE UPVOTE AN EXISTING ISSUE OR FILE A NEW ONE AT https://aka.ms/msbuild/unhandled {0} - Bu, MSBuild'de işlenmeyen bir istisnadır -- LÜTFEN MEVCUT BİR SORUNU OYLAYIN VEYA https://aka.ms/msbuild/unhandled ADRESİNDE YENİ BİR SORUN DOSYALAYIN + Bu, MSBuild'de işlenmeyen bir istisnadır -- LÜTFEN MEVCUT BİR SORUNU OYLAYIN VEYA https://aka.ms/msbuild/unhandled ADRESİNDE YENİ BİR SORUN OLUŞTURUN {0} diff --git a/src/Build/Resources/xlf/Strings.zh-Hans.xlf b/src/Build/Resources/xlf/Strings.zh-Hans.xlf index f5f0b5ec933..d13b0908ee6 100644 --- a/src/Build/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Build/Resources/xlf/Strings.zh-Hans.xlf @@ -2421,7 +2421,7 @@ Utilization: {0} Average Utilization: {1:###.0} MSB4229: The value "{0}" is not valid for an Sdk specification. The attribute should be a semicolon-delimited list of Sdk-name/minimum-version pairs, separated by a forward slash. - MSB4229: 值“{0}”对 Sdk 规范无效。此属性应该是以分号分隔的Sdk-name/minimum-version 对(用正斜杠分隔)的列表。 + MSB4229: 值“{0}”对 Sdk 规范无效。此属性应该是以分号分隔的Sdk-name/minimum-version 对 (用正斜杠分隔) 的列表。 {StrBegin="MSB4229: "} diff --git a/src/MSBuild/Resources/xlf/Strings.cs.xlf b/src/MSBuild/Resources/xlf/Strings.cs.xlf index 55929f8714c..bc757f96072 100644 --- a/src/MSBuild/Resources/xlf/Strings.cs.xlf +++ b/src/MSBuild/Resources/xlf/Strings.cs.xlf @@ -79,7 +79,7 @@ ({0:F1}s) - ({0:F1}s) + ({0:F1} s) {0}: duration in seconds with 1 decimal point @@ -575,20 +575,17 @@ Když se nastaví na MessageUponIsolationViolation (nebo jeho krátký -logger:XMLLogger,MyLogger,Version=1.0.2,Culture=neutral -logger:XMLLogger,C:\Loggers\MyLogger.dll;OutputAsHTML - -logger:<protok_nást> Použít daný protokolovací nástroj k protokolování - událostí nástroje MSBuild. Chcete-li zadat více protokolovacích. - nástrojů, musíte je zadat jednotlivě. - Syntaxe hodnoty <protok_nást>: - [<třída_protok_nást>,]<sestavení_protok_nást> - [;<param_protok_nást>] - Syntaxe hodnoty <třída_protok_nást>: - [<část/úpl_obor_názvů>.]<náz_tř_protok_nást> - Syntaxe hodnoty <sestavení_protok_nást>: - {<název_sestavení>[,<strong name>] | <soubor_sestavení>} + -logger:<logger> Použít daný protokolovací nástroj k protokolování událostí nástroje MSBuild. Pokud chcete zadat + více protokolovacích nástrojů, musíte je zadat jednotlivě. + Syntaxe hodnoty <logger> je: + [<class>,]<assembly>[,<options>][;<parameters>] + Syntaxe hodnoty <logger class> je: + [<partial or full namespace>.]<logger class name> + Syntaxe hodnoty <logger assembly> je: + {<assembly name>[,<strong name>] | <assembly file>} Parametry protokolovacího nástroje určují, jak MSBuild vytvoří protokolovací nástroj. - Parametry <param_protok_nást> jsou volitelné a předávají se - protokolovacímu nástroji přesně v tom tvaru, v jakém - byly zadány. (Krátký tvar: -l) + Parametry <logger parameters> jsou volitelné a předávají se + protokolovacímu nástroji přesně v tom tvaru, v jakém byly zadány. (Krátký tvar: -l) Příklady: -logger:XMLLogger,MyLogger,Version=1.0.2,Culture=neutral -logger:XMLLogger,C:\Loggers\MyLogger.dll;OutputAsHTML @@ -857,23 +854,20 @@ Když se nastaví na MessageUponIsolationViolation (nebo jeho krátký -dl:XMLLogger,MyLogger,Version=1.0.2,Culture=neutral -dl:MyLogger,C:\My.dll*ForwardingLogger,C:\Logger.dll - -distributedlogger:<centr_protok_nást>*<předáv_protok_nást> - Použít zadaný protokolovací nástroj pro protokolování událostí - z nástroje MSBuild; ke každému uzlu připojit jinou instanci - protokolovacího nástroje. Chcete-li zadat více - protokolovacích nástrojů, uveďte je jednotlivě. + -distributedLogger:<central logger>*<forwarding logger> + Použít zadaný protokolovací nástroj pro protokolování událostí z nástroje MSBuild; ke každému uzlu připojit + jinou instanci protokolovacího nástroje. Pokud chcete zadat více + protokolovacích nástrojů, uveďte je jednotlivě. (Krátký tvar: -dl) - Syntaxe hodnoty <protok_nást>: - [<třída_protok_nást>,]<sestav_protok_nást> - [;<param_protok_nást>] - Syntaxe hodnoty <třída_protok_nást>: - [<část/úpl_obor_názvů>.]<náz_tř_protok_nást> - Syntaxe hodnoty <sestav_protok_nást>: - {<název_sestavení>[,<strong name>] | <soubor_sestavení>} + Syntaxe hodnoty <logger> je: + [<class>,]<assembly>[,<options>][;<parameters>] + Syntaxe hodnoty <logger class> je: + [<partial or full namespace>.]<logger class name> + Syntaxe hodnoty <logger assembly> je: + {<assembly name>[,<strong name>] | <assembly file>} Parametry protokolovacího nástroje určují, jak MSBuild vytvoří protokolovací nástroj. Parametry <param_protok_nást> jsou volitelné a předávají se - protokolovacímu nástroji přesně v zadaném tvaru. - (Krátký tvar: -l) + protokolovacímu nástroji přesně v zadaném tvaru. (Krátký tvar: -l) Příklady: -dl:XMLLogger,MyLogger,Version=1.0.2,Culture=neutral -dl:MyLogger,C:\My.dll*ForwardingLogger,C:\Logger.dll @@ -1061,7 +1055,7 @@ Když se nastaví na MessageUponIsolationViolation (nebo jeho krátký Verbosity=diagnostic;Encoding=UTF-8 -flp:Summary;Verbosity=minimal;LogFile=msbuild.sum - -flp1:warningsonly;logfile=msbuild.wrn + -flp1:warningsonly;logfile=msbuild.wrn -flp2:errorsonly;logfile=msbuild.err diff --git a/src/MSBuild/Resources/xlf/Strings.de.xlf b/src/MSBuild/Resources/xlf/Strings.de.xlf index 226e0960175..11259a0daee 100644 --- a/src/MSBuild/Resources/xlf/Strings.de.xlf +++ b/src/MSBuild/Resources/xlf/Strings.de.xlf @@ -112,12 +112,11 @@ This flag is experimental and may not work as intended. - -reportFileAccesses[:True|Falsch] - Führt dazu, dass MSBuild Dateizugriffe an alle konfigurierten - meldet - Projektcache-Plug-Ins. + -reportFileAccesses[:True|False] + Führt dazu, dass MSBuild Dateizugriffe auf ein beliebiges konfiguriertes + Projektcache-Plug-In meldet. - Dieses Kennzeichen ist experimentell und funktioniert möglicherweise nicht wie vorgesehen. + Dieses Flag ist experimentell und funktioniert möglicherweise nicht wie vorgesehen. LOCALIZATION: "-reportFileAccesses" should not be localized. @@ -574,11 +573,11 @@ Dies ist ein restriktiverer Modus von MSBuild, da er erfordert, -logger:<Protokollierung> Mithilfe dieser Protokollierung werden Ereignisse von MSBuild protokolliert. Um mehrere Protokollierungen anzugeben, wird jede Protokollierung gesondert angegeben. Die Syntax für die <Protokollierung> lautet: - [<Klasse>,]<Assembly>[,<Optionen>][;<Parameter>] + [<Klasse>,]<assembly>[,<Optionen>][;<Parameter>] Die Syntax für die <Protokollierungsklasse> lautet: [<Teilweiser oder vollständiger Namespace>.]<Name der Protokollierungsklasse> Die Syntax für die <Protokollierungsassembly> lautet: - {<Assemblyname>[,<strong name>] | <Assemblydatei>} + {<assembly name>[,<strong name>] | <assembly file>} Die Protokollierungsoptionen geben an, wie MSBuild die Protokollierung erstellt. Die <Protokollierungsparameter> sind optional und werden genau so an die Protokollierung übergeben, wie sie eingegeben wurden. (Kurzform: -l) @@ -856,11 +855,11 @@ Dieses Protokollierungsformat ist standardmäßig aktiviert. gesondert angegeben. (Kurzform -dl) Die Syntax für die <Protokollierung> lautet: - [<Klasse>,]<Assembly>[,<Optionen>][;<Parameter>] + [<Klasse>,]<assembly>[,<Optionen>][;<Parameter>] Die Syntax für die <Protokollierungsklasse> lautet: [<Teilweiser oder vollständiger Namespace>.]<Name der Protokollierungsklasse> Die Syntax für die <Protokollierungsassembly> lautet: - {<Assemblyname>[,<strong name>] | <Assemblydatei>} + {<assembly name>[,<strong name>] | <assembly file>} Die Protokollierungsoptionen geben an, wie MSBuild die Protokollierung erstellt. Die <Protokollierungsparameter> sind optional und werden genau so an die Protokollierung übergeben, wie sie eingegeben wurden. (Kurzform: -l) diff --git a/src/MSBuild/Resources/xlf/Strings.es.xlf b/src/MSBuild/Resources/xlf/Strings.es.xlf index 1846d8646a1..5e02da6973e 100644 --- a/src/MSBuild/Resources/xlf/Strings.es.xlf +++ b/src/MSBuild/Resources/xlf/Strings.es.xlf @@ -79,7 +79,7 @@ ({0:F1}s) - ({0:F1}s) + ({0:F1}s) {0}: duration in seconds with 1 decimal point @@ -116,7 +116,7 @@ Hace que MSBuild informe de los accesos a los archivos a cualquier complemento de caché de proyectos. -Esta marca es experimental y puede que no funcione según lo previsto. + Esta marca es experimental y puede que no funcione según lo previsto. LOCALIZATION: "-reportFileAccesses" should not be localized. @@ -571,18 +571,14 @@ Esta marca es experimental y puede que no funcione según lo previsto. -logger:XMLLogger,C:\Loggers\MyLogger.dll;OutputAsHTML -logger:<registrador> Use este registrador para registrar eventos - de MSBuild. Para especificar varios registradores, especifique - cada uno de ellos por separado. + de MSBuild. Para especificar varios registradores, especifique cada uno de ellos por separado. La sintaxis de <registrador> es: - [<clase>,]<ensamblado>[,<opciones>][;<parámetros>] + [<clase>,]<assembly>[,<opciones>][;<parámetros>] La sintaxis de <clase del registrador> es: - [<espacio de nombres parcial o completo>.]<nombre de - clase del registrador> - La sintaxis de <ensamblado del registrador> es: - {<nombre del ensamblado>[,<strong name>] | <archivo - de ensamblado>} - Las opciones del registrador especifican cómo crea MSBuild - el registrador. + [<espacio de nombres parcial o completo>.]<nombre de clase del registrador> + La sintaxis de <ensamblado del registrador> es: + {<assembly name>[,<strong name>] | <assembly file>} + Las opciones del registrador especifican cómo crea MSBuild el registrador. Los <parámetros del registrador> son opcionales y se pasan al registrador tal como se escriben. (Forma corta: -l) Ejemplos: @@ -859,15 +855,12 @@ Esta marca es experimental y puede que no funcione según lo previsto. Para especificar varios registradores, especifique cada uno de ellos por separado. (Forma corta: -dl) La sintaxis de <registrador> es: - [<clase>,]<ensamblado>[,<opciones>][;<parámetros>] + [<clase>,]<assembly>[,<opciones>][;<parámetros>] La sintaxis de <clase del registrador> es: - [<espacio de nombres parcial o completo>.]<nombre - de la clase del registrador> + [<espacio de nombres parcial o completo>.]<nombre de la clase del registrador> La sintaxis de <ensamblado del registrador> es: - {<nombre del ensamblado>[,<strong name>] | <archivo - de ensamblado>} - Las opciones del registrador especifican cómo crea MSBuild - el registrador. + {<assembly name>[,<strong name>] | <assembly file>} + Las opciones del registrador especifican cómo crea MSBuild el registrador. Los <parámetros del registrador> son opcionales y se pasan al registrador tal como se escriben. (Forma corta: -l) Ejemplos: diff --git a/src/MSBuild/Resources/xlf/Strings.fr.xlf b/src/MSBuild/Resources/xlf/Strings.fr.xlf index f4d88741a76..8e0c9192e96 100644 --- a/src/MSBuild/Resources/xlf/Strings.fr.xlf +++ b/src/MSBuild/Resources/xlf/Strings.fr.xlf @@ -114,7 +114,7 @@ -reportFileAccesses[:True|False] Entraîne le signalement par MSBuild des accès par fichiers aux plug-ins - cache de projet configurés. + de cache de projet configurés. Cet indicateur est expérimental et peut ne pas fonctionner comme prévu. @@ -577,7 +577,7 @@ Cet indicateur est expérimental et peut ne pas fonctionner comme prévu. Syntaxe de <classe de journalisation> : [<espace de noms partiels ou complets>.]<nom de la classe de journalisation> Syntaxe de <assembly de journalisation> : - {<nom d'assembly>[,<strong name>] | <fichier d'assembly>} + {<assembly name>[,<strong name>] | <assembly file>} Les options de journalisation spécifient la façon dont MSBuild crée le journaliseur. Les <paramètres de journalisation> sont facultatifs. Ils sont passés au journaliseur tels que vous les avez tapés. (Forme abrégée : -l) @@ -859,7 +859,7 @@ Remarque : verbosité des enregistreurs d’événements de fichiers Syntaxe de <classe de journalisation> : [<espace de noms partiels ou complets>.]<nom de la classe de journalisation> Syntaxe de <assembly de journalisation> : - {<nom d'assembly>[,<strong name>] | <fichier d'assembly>} + {<assembly name>[,<strong name>] | <assembly file>} Les options de journalisation spécifient la façon dont MSBuild crée le journaliseur. Les <paramètres de journalisation> sont facultatifs. Ils sont passés au journaliseur tels que vous les avez tapés. (Forme abrégée : -l) @@ -1323,7 +1323,7 @@ Remarque : verbosité des enregistreurs d’événements de fichiers MSBUILD : error MSB1014: Must provide an item name for the getItem switch. - MSBUILD : error MSB1014: Must provide an item name for the getItem switch. + MSBUILD : error MSB1014: Doit fournir un nom d'élément pour le commutateur getItem. {StrBegin="MSBUILD : error MSB1014: "}UE: This happens if the user does something like "msbuild.exe -getItem". The user must pass in an actual item name following the switch, as in "msbuild.exe -getItem:blah". @@ -1332,7 +1332,7 @@ Remarque : verbosité des enregistreurs d’événements de fichiers MSBUILD : error MSB1010: Must provide a property name for the getProperty switch. - MSBUILD : error MSB1010: Must provide a property name for the getProperty switch. + MSBUILD : error MSB1010: Doit fournir un nom de propriété pour le commutateur getProperty. {StrBegin="MSBUILD : error MSB1010: "}UE: This happens if the user does something like "msbuild.exe -getProperty". The user must pass in an actual property name following the switch, as in "msbuild.exe -getProperty:blah". @@ -1341,7 +1341,7 @@ Remarque : verbosité des enregistreurs d’événements de fichiers MSBUILD : error MSB1017: Must provide a target name for the getTargetResult switch. - MSBUILD : error MSB1017: Must provide a target name for the getTargetResult switch. + MSBUILD : error MSB1017: Doit fournir un nom de cible pour le commutateur getTargetResult. {StrBegin="MSBUILD : error MSB1017: "}UE: This happens if the user does something like "msbuild.exe -getTargetResult". The user must pass in an actual target name following the switch, as in "msbuild.exe -getTargetResult:blah". @@ -1605,7 +1605,7 @@ Remarque : verbosité des enregistreurs d’événements de fichiers MSBUILD : error MSB1063: Cannot access properties or items when building solution files or solution filter files. This feature is only available when building individual projects. - MSBUILD : error MSB1063: Cannot access properties or items when building solution files or solution filter files. This feature is only available when building individual projects. + MSBUILD : error MSB1063: Impossible d'accéder aux propriétés ou aux éléments lors de la création de fichiers de solution ou de fichiers de filtre de solution. Cette fonctionnalité est disponible uniquement lors de la génération de projets individuels. {StrBegin="MSBUILD : error MSB1063: "}UE: This happens if the user passes in a solution file when trying to access individual properties or items. The user must pass in a project file. LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. diff --git a/src/MSBuild/Resources/xlf/Strings.it.xlf b/src/MSBuild/Resources/xlf/Strings.it.xlf index 12e7aa2ac94..03015b156c1 100644 --- a/src/MSBuild/Resources/xlf/Strings.it.xlf +++ b/src/MSBuild/Resources/xlf/Strings.it.xlf @@ -79,7 +79,7 @@ ({0:F1}s) - ({0:F1}s) + ({0:F1}s) {0}: duration in seconds with 1 decimal point @@ -113,10 +113,10 @@ This flag is experimental and may not work as intended. -reportFileAccesses[:True|False] - Fa in modo che MSBuild segnali gli accessi ai file a qualsiasi file configurato + Fa in modo che MSBuild segnali gli accessi ai file a qualsiasi plug-in della cache del progetto. -Questo flag è sperimentale e potrebbe non funzionare come previsto. + Questo flag è sperimentale e potrebbe non funzionare come previsto. LOCALIZATION: "-reportFileAccesses" should not be localized. @@ -155,7 +155,7 @@ Questo flag è sperimentale e potrebbe non funzionare come previsto. MSBuild version {0} for {1} - Versione di MSBuild {0} per {1} + Versione di MSBuild Ł{0} per {1} LOCALIZATION: {0} contains the DLL version number. {1} contains the name of a runtime, like ".NET Framework", ".NET Core", or "Mono" @@ -583,8 +583,8 @@ Questo flag è sperimentale e potrebbe non funzionare come previsto. [<classe>,]<assembly>[,<opzioni>][;<parametri>] La sintassi di <classe logger> è la seguente: [<spazio dei nomi parziale o completo>.]<nome classe logger> - La sintassi di <assembly logger> è la seguente: - {<nome assembly>[,<strong name>] | <file di assembly>} + La sintassi di <logger assembly> è la seguente: + {<assembly name>[,<strong name>] | <assembly file>} Le opzioni di logger consentono di specificare in che modo MSBuild crea il logger. I <parametri logger> sono facoltativi e vengono passati al logger così come vengono digitati. Forma breve: -l. @@ -865,8 +865,8 @@ Nota: livello di dettaglio dei logger di file [<classe>,]<assembly>[,<opzioni>][;<parametri>] La sintassi di <classe logger> è la seguente: [<spazio dei nomi parziale o completo>.]<nome classe logger> - La sintassi di <assembly logger> è la seguente: - {<nome assembly>[,<strong name>] | <file di assembly>} + La sintassi di <logger assembly> è la seguente: + {<assembly name>[,<strong name>] | <assembly file>} Le opzioni di logger consentono di specificare in che modo MSBuild crea il logger. I <parametri logger> sono facoltativi e vengono passati al logger così come vengono digitati. Forma breve: -l @@ -985,9 +985,8 @@ Nota: livello di dettaglio dei logger di file è la directory corrente. Per impostazione predefinita, ai file viene assegnato il nome "MSBuild<idnodo>.log". Il percorso dei file e altri parametri di fileLogger possono - essere specificati aggiungendo l'opzione + essere specificati aggiungendo l'opzione "-fileLoggerParameters". - "-fileLoggerParameters". Se il nome di un file di log viene impostato con l'opzione fileLoggerParameters, il logger distribuito userà il nome file come modello e aggiungerà l'ID del nodo per creare un @@ -2034,16 +2033,15 @@ Esegue la profilatura della valutazione di MSBuild e scrive -restoreProperty:IsRestore=true;MyProperty=value -restoreProperty:<n>=<v> - Imposta queste proprietà a livello di progetto o ne esegue - l'override solo durante il ripristino e non usa le - proprietà specificate con l'argomento -property. - <v> rappresenta il nome della proprietà e <v> il - valore della proprietà. Usare il punto e virgola o la - virgola per delimitare più proprietà o specificare ogni - proprietà separatamente. - Forma breve: -rp. - Esempio: - -restoreProperty:IsRestore=true;MyProperty=value + Imposta queste proprietà a livello di progetto o ne esegue + l'override solo durante il ripristino e non usa le + proprietà specificate con l'argomento -property. + <v> rappresenta il nome della proprietà e <v> il + valore della proprietà. Usare il punto e virgola o la + virgola per delimitare più proprietà o specificare ogni proprietà separatamente. + (Forma breve: -rp) + Esempio: + -restoreProperty:IsRestore=true;MyProperty=value LOCALIZATION: "-restoreProperty" and "-rp" should not be localized. diff --git a/src/MSBuild/Resources/xlf/Strings.ja.xlf b/src/MSBuild/Resources/xlf/Strings.ja.xlf index cd05368111a..533e64a7478 100644 --- a/src/MSBuild/Resources/xlf/Strings.ja.xlf +++ b/src/MSBuild/Resources/xlf/Strings.ja.xlf @@ -79,7 +79,7 @@ ({0:F1}s) - ({0:F1}s) + ({0:F1}s) {0}: duration in seconds with 1 decimal point @@ -114,7 +114,7 @@ -reportFileAccesses[:True|False] MSBuild が、構成されているプロジェクト キャッシュ プラグインへの - ファイル アクセスを報告します。 + ファイル アクセスを報告するようにします。 このフラグは実験的なものであり、意図したとおりに動作しない可能性があります。 @@ -135,7 +135,7 @@ MSBUILD : error MSB1065: Terminal logger value is not valid. It should be one of 'auto', 'true', or 'false'. {0} - MSBUILD : error MSB1065: ターミナル ロガーの値が無効です。'auto'、'true'、または 'false' のいずれかである必要があります。 {0} + MSBUILD : error MSB1065: ターミナル ロガーの値が無効です。'auto'、'true'、または 'false' のいずれかである必要があります。{0} {StrBegin="MSBUILD : error MSB1065: "} UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. diff --git a/src/MSBuild/Resources/xlf/Strings.ko.xlf b/src/MSBuild/Resources/xlf/Strings.ko.xlf index dfa81b71e90..bd9200d5539 100644 --- a/src/MSBuild/Resources/xlf/Strings.ko.xlf +++ b/src/MSBuild/Resources/xlf/Strings.ko.xlf @@ -573,11 +573,11 @@ -logger:<로거> 이 로거를 사용하여 MSBuild의 이벤트를 기록합니다. 여러 로거를 지정하려면 각 로거를 개별적으로 지정합니다. <로거> 구문은 다음과 같습니다. - [<클래스>,]<어셈블리>[,<옵션>][;<매개 변수>] + [<클래스>,]<assembly>[,<옵션>][;<매개 변수>] <로거 클래스> 구문은 다음과 같습니다. [<부분 또는 전체 네임스페이스>.]<로거 클래스 이름> <로거 어셈블리> 구문은 다음과 같습니다. - {<어셈블리 이름>[,<strong name>] | <어셈블리 파일>} + {<assembly name>[,<strong name>] | <assembly file>} 로거 옵션은 MSBuild가 로거를 만드는 방법을 지정합니다. <로거 매개 변수>는 선택 사항이고 입력한 대로 정확히 로거에 전달됩니다. (약식: -l) @@ -855,11 +855,11 @@ 로거를 지정하려면 각 로거를 개별적으로 지정합니다. (약식 -dl) <로거> 구문은 다음과 같습니다. - [<클래스>,]<어셈블리>[,<옵션>][;<매개 변수>] + [<클래스>,]<assembly>[,<옵션>][;<매개 변수>] <로거 클래스> 구문은 다음과 같습니다. [<부분 또는 전체 네임스페이스>.]<로거 클래스 이름> <로거 어셈블리> 구문은 다음과 같습니다. - {<어셈블리 이름>[,<strong name>] | <어셈블리 파일>} + {<assembly name>[,<strong name>] | <assembly file>} 로거 옵션은 MSBuild가 로거를 만드는 방법을 지정합니다. <로거 매개 변수>는 선택 사항이고 입력한 대로 정확히 로거에 전달됩니다. (약식: -l) diff --git a/src/MSBuild/Resources/xlf/Strings.pl.xlf b/src/MSBuild/Resources/xlf/Strings.pl.xlf index 133760011df..f4caceb0acc 100644 --- a/src/MSBuild/Resources/xlf/Strings.pl.xlf +++ b/src/MSBuild/Resources/xlf/Strings.pl.xlf @@ -79,7 +79,7 @@ ({0:F1}s) - ({0:F1}s) + ({0:F1}s) {0}: duration in seconds with 1 decimal point @@ -113,10 +113,10 @@ This flag is experimental and may not work as intended. -reportFileAccesses[:True|False] - Powoduje, że program MSBuild zgłasza dostępy do wszystkich skonfigurowanych plików + Powoduje, że platforma MSBuild zgłasza dostępy do wszystkich skonfigurowanych wtyczek pamięci podręcznej projektu. -Ta flaga jest eksperymentalna i może nie działać zgodnie z oczekiwaniami. + Ta flaga jest eksperymentalna i może nie działać zgodnie z oczekiwaniami. LOCALIZATION: "-reportFileAccesses" should not be localized. @@ -575,17 +575,14 @@ Ta flaga jest eksperymentalna i może nie działać zgodnie z oczekiwaniami. -logger:XMLLogger,MyLogger,Version=1.0.2,Culture=neutral -logger:XMLLogger,C:\Loggers\MyLogger.dll;OutputAsHTML - -logger:<rejestrator> Umożliwia użycie podanego rejestratora do rejestrowania - zdarzeń pochodzących z programu MSBuild. Aby określić - wiele rejestratorów, określ każdy z nich osobno. + -logger:<rejestrator> Umożliwia użycie podanego rejestratora do rejestrowania zdarzeń pochodzących + z programu MSBuild. Aby określić wiele rejestratorów, określ każdy z nich osobno. Składnia elementu <rejestrator>: - [<klasa rejestratora>,]<zestaw rejestratora> - [;<parametry rejestratora>] + [<klasa rejestratora>,]<assembly> [;<parametry rejestratora>] Składnia elementu <klasa rejestratora>: - [<częściowa lub pełna przestrzeń nazw>.] - <nazwa klasy rejestratora> + [<częściowa lub pełna przestrzeń nazw>.] <nazwa klasy rejestratora> Składnia elementu <zestaw rejestratora>: - {<nazwa zestawu>[,<strong name>] | <plik zestawu>} + {<assembly name>[,<strong name>] | <assembly file>} Wartości <parametry rejestratora> są opcjonalne i są przekazywane do rejestratora dokładnie tak, jak zostały wpisane. (Krótka wersja: -l) @@ -864,11 +861,11 @@ Ta flaga jest eksperymentalna i może nie działać zgodnie z oczekiwaniami. wiele rejestratorów, określ każdy z nich osobno. (Krótka wersja: -dl) Składnia elementu <rejestrator>: - [<klasa rejestratora>,]<zestaw rejestratora>[;<parametry rejestratora>] + [<klasa rejestratora>,]<assembly>[;<parametry rejestratora>] Składnia elementu <klasa rejestratora>: [<częściowa lub pełna przestrzeń nazw>.]<nazwa klasy rejestratora> Składnia elementu <zestaw rejestratora>: - {<nazwa zestawu>[,<strong name>] | <plik zestawu>} + {<assembly name>[,<strong name>] | <assembly file>} Wartości <parametry rejestratora> są opcjonalne i są przekazywane do rejestratora dokładnie tak, jak zostały wpisane. (Krótka wersja: -l) @@ -980,13 +977,11 @@ Ta flaga jest eksperymentalna i może nie działać zgodnie z oczekiwaniami. create a log file for each node. -distributedFileLogger - Rejestruje dane wyjściowe kompilacji w wielu plikach - dziennika, po jednym pliku na węzeł programu MSBuild. - Początkową lokalizacją tych plików jest bieżący katalog. - Domyślnie pliki mają nazwę + Rejestruje dane wyjściowe kompilacji w wielu plikach dziennika,po jednym pliku + na węzeł programu MSBuild. Początkową lokalizacją tych plików + jest bieżący katalog. Domyślnie pliki mają nazwę „MSBuild<identyfikator węzła>.log”. Lokalizację plików i inne parametry rejestratora plików można określić - przez dodanie przełącznika „-fileLoggerParameters”. Jeśli nazwa pliku zostanie ustawiona za pomocą przełącznika diff --git a/src/MSBuild/Resources/xlf/Strings.pt-BR.xlf b/src/MSBuild/Resources/xlf/Strings.pt-BR.xlf index 247e14490ef..f84a9fbf2fa 100644 --- a/src/MSBuild/Resources/xlf/Strings.pt-BR.xlf +++ b/src/MSBuild/Resources/xlf/Strings.pt-BR.xlf @@ -79,7 +79,7 @@ ({0:F1}s) - ({0:F1}s) + ({0:F1}s) {0}: duration in seconds with 1 decimal point @@ -113,8 +113,9 @@ This flag is experimental and may not work as intended. -reportFileAccesses[:True|False] - Faz com que o MSBuild relate acessos a arquivos para qualquer plug-in - de cache de projeto configurado. + Faz com que o MSBuild relate acessos a arquivos a qualquer + configurado + plug-ins de cache do projeto. Este sinalizador é experimental e pode não funcionar conforme o esperado. diff --git a/src/MSBuild/Resources/xlf/Strings.ru.xlf b/src/MSBuild/Resources/xlf/Strings.ru.xlf index 1d89ce20f45..f47e63ce4c4 100644 --- a/src/MSBuild/Resources/xlf/Strings.ru.xlf +++ b/src/MSBuild/Resources/xlf/Strings.ru.xlf @@ -135,7 +135,7 @@ MSBUILD : error MSB1065: Terminal logger value is not valid. It should be one of 'auto', 'true', or 'false'. {0} - MSBUILD : error MSB1065: Terminal logger value is not valid. It should be one of 'auto', 'true', or 'false'. {0} + MSBUILD : error MSB1065: Недопустимое значение средства ведения журнала терминала. Это должно быть одно из следующих значений: "auto", "ИСТИНА" или "ЛОЖЬ". {0} {StrBegin="MSBUILD : error MSB1065: "} UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. diff --git a/src/MSBuild/Resources/xlf/Strings.tr.xlf b/src/MSBuild/Resources/xlf/Strings.tr.xlf index d3fc5c7e9ed..762af4f5778 100644 --- a/src/MSBuild/Resources/xlf/Strings.tr.xlf +++ b/src/MSBuild/Resources/xlf/Strings.tr.xlf @@ -573,13 +573,13 @@ -logger:<günlükçü> MSBuild'deki olayları günlüğe almak için bu günlükçüyü kullanın. Birden fazla günlükçü belirtmek için her günlükçüyü ayrı ayrı belirtin. <günlükçü> söz dizimi şöyledir: - [<sınıf>,]<derleme>[,<seçenekler>][;<parametreler>] + [<class>,]<assembly>[,<options>][;<parameters>] <günlükçü sınıfı > söz dizimi şöyledir: [<kısmi veya tam ad alanı >.]<günlükçü sınıfı adı> <günlükçü derlemesi> söz dizimi şöyledir: - {<derleme adı>[,<strong name>] | <derleme dosyası>} + {<assembly name>[,<strong name>] | <assembly file>} Günlükçü seçenekleri, MSBuild'in günlükçüyü oluşturma biçimini belirtir. - <günlükçü parametreleri > isteğe bağlıdır ve tam olarak + <günlükçü parametreleri > isteğe bağlıdır ve tam olarak yazdığınız şekliyle günlükçüye geçirilir. (Kısa biçim: -l) Örnekler: -logger:XMLLogger,MyLogger,Version=1.0.2,Culture=neutral @@ -855,11 +855,11 @@ günlükçü belirtmek için her günlükçüyü ayrı ayrı belirtin. (Kısa biçim -dl) <günlükçü> söz dizimi şöyledir: - [<sınıf>,]<derleme>[,<seçenekler>][;<parametreler>] + [<sınıf>,]<assembly>[,<seçenekler>][;<parametreler>] <günlükçü sınıfı> söz dizimi şöyledir: [<kısmi veya tam ad alanı>.]<günlükçü sınıfı adı> <günlükçü derlemesi> söz dizimi şöyledir: - {<derleme adı>[,<strong name>] | <derleme dosyası>} + {<assembly name>[,<strong name>] | <assembly file>} Günlükçü seçenekleri, MSBuild'in günlükçüyü oluşturma biçimini belirtir. <günlükçü parametreleri> isteğe bağlıdır ve tam olarak yazdığınız şekliyle günlükçüye geçirilir. (Kısa biçim: -l) @@ -886,10 +886,9 @@ -ignoreProjectExtensions:.sln -ignoreProjectExtensions:<uzantılar> - Hangi proje dosyasının oluşturulacağı belirlenirken - yoksayılacak uzantıların listesi. Birden çok uzantıyı - birbirinden ayırmak için noktalı virgül veya - virgül kullanın. + Hangi proje dosyasının oluşturulacağı belirlenirken + yoksayılacak uzantıların listesi. Birden çok uzantıyı + birbirinden ayırmak için noktalı virgül veya virgül kullanın. (Kısa biçim: -ignore) Örnek: -ignoreProjectExtensions:.sln @@ -979,7 +978,6 @@ Dosyaların konumu ve fileLogger'ın diğer parametreleri "/fileLoggerParameters" anahtarının eklenmesi yoluyla belirtilebilir. - Günlük dosyası adı fileLoggerParameters anahtarı aracılığıyla ayarlanırsa dağıtılmış günlükçü fileName değerini şablon olarak kullanıp her düğümün günlük dosyasını @@ -1026,32 +1024,31 @@ -fileLoggerParameters[n]:<parametreler> Dosya günlükçüleri için ek parametreler sağlar. - Bu anahtarın olması karşılık gelen -fileLogger[n] + Bu anahtarın olması karşılık gelen -fileLogger[n] anahtarının olduğu anlamına gelir. "n" varsa, 1-9 arasında bir rakam olabilir. - Dağıtılmış dosya günlükçüleri varsa -fileLoggerParameters - bunlar tarafından da kullanılır; -distributedFileLogger - açıklamasına bakın. + Dağıtılmış dosya günlükçüleri varsa -fileLoggerParameters + bunlar tarafından da kullanılır; -distributedFileLogger açıklamasına bakın. (Kısa biçim: -flp[n]) - Konsol günlükçüsü için listelenenlerle aynı parametreler + Konsol günlükçüsü için listelenenlerle aynı parametreler kullanılabilir. Kullanılabilecek bazı ek parametreler: - LogFile--Oluşturma günlüğünün yazılacağı günlük + LogFile--Oluşturma günlüğünün yazılacağı günlük dosyasının yolu. - Append--Derleme günlüğünün gün dosyasının sonuna mı - ekleneceğini yoksa üzerine mi yazılacağını - belirler. Anahtar ayarlandığında oluşturma günlüğü - dosyanın sonuna eklenir. Anahtar ayarlanmadığında - varolan günlük dosyasının üzerine yazılır. + Append--Derleme günlüğünün gün dosyasının sonuna mı + ekleneceğini yoksa üzerine mi yazılacağını + belirler. Anahtar ayarlandığında oluşturma günlüğü + dosyanın sonuna eklenir. Anahtar ayarlanmadığında + varolan günlük dosyasının üzerine yazılır. Varsayılan: günlük dosyasının sonuna eklenmez. - Encoding--Dosyanın kodlamasını belirtir; örneğin, + Encoding--Dosyanın kodlamasını belirtir; örneğin, UTF-8, Unicode veya ASCII Varsayılan ayrıntı düzeyi ayarı Detailed'dır. Örnekler: -fileLoggerParameters:LogFile=MyLog.log;Append; Verbosity=diagnostic;Encoding=UTF-8 - -flp:Summary;Verbosity=minimal;LogFile=msbuild.sum - -flp1:warningsonly;logfile=msbuild.wrn + -flp:Summary;Verbosity=minimal;LogFile=msbuild.sum + -flp1:warningsonly;logfile=msbuild.wrn -flp2:errorsonly;logfile=msbuild.err @@ -1075,8 +1072,7 @@ -nr:true -nodeReuse:<parametreler> - MSBuild düğümlerinin yeniden kullanımını etkinleştirir - veya devre dışı bırakır. + MSBuild düğümlerinin yeniden kullanımını etkinleştirir veya devre dışı bırakır. Parametreler: True --Derleme tamamlandıktan sonra düğümler kalır ve izleyen derlemelerde yeniden kullanılır (varsayılan) @@ -1407,7 +1403,7 @@ MSBUILD : error MSB1066: Specify one or more parameters for the terminal logger if using the -terminalLoggerParameters switch - MSBUILD : error MSB1066: -terminalLoggerParameters anahtarı kullanılıyorsa terminal günlükçüsü için bir veya birden çok parametre belirtin + MSBUILD : error MSB1066: terminalLoggerParameters anahtarı kullanılıyorsa terminal günlükçüsü için bir veya birden çok parametre belirtin {StrBegin="MSBUILD : error MSB1066: "} UE: This happens if the user does something like "msbuild.exe -termionalLoggerParameters:". The user must pass in one or more parameters diff --git a/src/MSBuild/Resources/xlf/Strings.zh-Hant.xlf b/src/MSBuild/Resources/xlf/Strings.zh-Hant.xlf index b603ad790a6..2a4877909af 100644 --- a/src/MSBuild/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/MSBuild/Resources/xlf/Strings.zh-Hant.xlf @@ -79,7 +79,7 @@ ({0:F1}s) - ({0:F1}s) + ({0:F1} 秒) {0}: duration in seconds with 1 decimal point @@ -573,11 +573,11 @@ -logger:<記錄器> 使用此記錄器可記錄 MSBuild 的事件。 若要指定多個記錄器,請各別指定每個記錄器。 <記錄器> 語法為: - [<類別>,]<組件>[,<選項>][;<參數>] + [<class>,]<assembly>[,<options>][;<parameters>] <記錄器類別> 語法為: [<一部分或完整的命名空間>.]<記錄器類別名稱> <記錄器組件> 語法為: - {<組件名稱>[,<strong name>] | <組件檔案>} + {<assembly name>[,<strong name>] | <assembly file>} 記錄器選項會指定 MSBuild 建立記錄器的方式。 <記錄器參數> 是選擇性參數,其會依您輸入的內容, 完全一樣地傳遞到記錄器。(簡短形式: -l) @@ -855,11 +855,11 @@ 若要指定多個記錄器,請各別指定每個記錄器。 (簡短形式 -dl) <記錄器> 語法為: - [<類別>,]<組件>[,<選項>][;<參數>] + [<class>,]<assembly>[,<options>][;<parameters>] <記錄器類別> 語法為: [<一部分或完整的命名空間>.]<記錄器類別名稱> <記錄器組件> 語法為: - {<組件名稱>[,<strong name>] | <組件檔案>} + {<assembly name>[,<strong name>] | <assembly file>} 記錄器選項會指定 MSBuild 建立記錄器的方式。 <記錄器參數> 是選擇性參數,其會依您輸入的內容, 完全一樣地傳遞到記錄器。(簡短形式: -l) diff --git a/src/Tasks/Resources/xlf/Strings.es.xlf b/src/Tasks/Resources/xlf/Strings.es.xlf index a3c16e3c798..7715a0c317b 100644 --- a/src/Tasks/Resources/xlf/Strings.es.xlf +++ b/src/Tasks/Resources/xlf/Strings.es.xlf @@ -118,7 +118,7 @@ MSB3654: Delay signing requires that at least a public key be specified. Please either supply a public key using the KeyFile or KeyContainer properties, or disable delay signing. - MSB3654: La firma retardada requiere que se especifique al menos una clave pública. Proporcione una clave pública mediante las propiedades KeyFile o KeyContainer, o deshabilite la firma retardada. + MSB3654: La firma retrasada requiere que se especifique al menos una clave pública. Proporcione una clave pública mediante las propiedades KeyFile o KeyContainer, o deshabilite la firma retrasada. {StrBegin="MSB3654: "} @@ -2302,7 +2302,7 @@ MSB3295: Failed to load an assembly. Please make sure you have disabled strong name verification for your public key if you want to generate delay signed wrappers. {0} - MSB3295: No se pudo cargar un ensamblado. Asegúrese de que deshabilitó la comprobación de nombres seguros para su clave pública si desea generar contenedores de firma retardada. {0} + MSB3295: No se pudo cargar un ensamblado. Asegúrese de que deshabilitó la comprobación de nombres seguros para su clave pública si desea generar contenedores de firma con retraso. {0} {StrBegin="MSB3295: "} @@ -2511,7 +2511,7 @@ MSB3353: Public key necessary for delay signing was not specified. - MSB3353: No se especificó la clave pública necesaria para la firma retardada. + MSB3353: No se especificó la clave pública necesaria para la firma con retraso. {StrBegin="MSB3353: "} diff --git a/src/Tasks/Resources/xlf/Strings.it.xlf b/src/Tasks/Resources/xlf/Strings.it.xlf index 65f4471d1dc..49d2bb9524a 100644 --- a/src/Tasks/Resources/xlf/Strings.it.xlf +++ b/src/Tasks/Resources/xlf/Strings.it.xlf @@ -123,12 +123,12 @@ MSB3991: '{0}' is not set or empty. When {1} is false, make sure to set a non-empty value for '{0}'. - MSB3991: '{0}' non è impostato o è vuoto. Quando {1} è false, assicurarsi di impostare un valore non vuoto per '{0}'. + MSB3991: “{0}” non è impostato o è vuoto. Quando {1} è false, assicurarsi di impostare un valore non vuoto per "{0}". {StrBegin="MSB3991: "} MSB3992: '{0}' is not set. When {1} is true, make sure to set a value for '{0}'. - MSB3992: '{0}' non è impostato. Quando {1} è true, assicurarsi di impostare un valore per '{0}'. + MSB3992: "{0}" non impostato. Quando {1} è true, assicurarsi di impostare un valore per "{0}". {StrBegin="MSB3992: "} From e514b5973d09e1b8fe4e2cb154e4b680efc135ec Mon Sep 17 00:00:00 2001 From: AR-May <67507805+AR-May@users.noreply.github.com> Date: Thu, 21 Dec 2023 13:54:41 +0100 Subject: [PATCH 12/12] final branding for 17.9 (#9551) --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index 766faf29449..92692ce06ae 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -2,7 +2,7 @@ - 17.9.0 + 17.9.0release 17.8.3 15.1.0.0 preview