From 90ca1ae6649c0db4d27c61420b5a2fca7a5643fe Mon Sep 17 00:00:00 2001 From: Himanshu Yadav Date: Tue, 18 Jun 2019 12:31:59 +0530 Subject: [PATCH 1/2] updated error message to be actionable for no web project found. --- .../Strings/resources.resjson/en-US/resources.resjson | 2 +- Tasks/DotNetCoreCLIV2/dotnetcore.ts | 4 ++-- Tasks/DotNetCoreCLIV2/task.json | 6 +++--- Tasks/DotNetCoreCLIV2/task.loc.json | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Tasks/DotNetCoreCLIV2/Strings/resources.resjson/en-US/resources.resjson b/Tasks/DotNetCoreCLIV2/Strings/resources.resjson/en-US/resources.resjson index 646ac3d263f9..8bee45cf9e30 100644 --- a/Tasks/DotNetCoreCLIV2/Strings/resources.resjson/en-US/resources.resjson +++ b/Tasks/DotNetCoreCLIV2/Strings/resources.resjson/en-US/resources.resjson @@ -103,7 +103,7 @@ "loc.messages.dotnetCommandFailed": "Dotnet command failed with non-zero exit code on the following projects : %s", "loc.messages.noProjectFilesFound": "Project file(s) matching the specified pattern were not found.", "loc.messages.noPublishFolderFoundToZip": "A publish folder could not be found to zip for project file: %s.", - "loc.messages.noWebProjctFound": "No web project was found in the repository. Web projects are identified by presence of either a web.config file or wwwroot folder in the directory.", + "loc.messages.noWebProjectFound": "No web project was found in the repository. Web projects are identified by presence of either a web.config file or wwwroot folder in the directory. You can uncheck `Publish Web Projects` if your project doesn't follow the aforementioned web project criteria.", "loc.messages.zipFailed": "Zip failed with error: %s", "loc.messages.Error_ApiKeyNotSupported": "DotNetCore currently does not support using an encrypted Api Key.", "loc.messages.Error_ExpectedConfigurationElement": "Invalid xml. Expected element named 'configuration'.", diff --git a/Tasks/DotNetCoreCLIV2/dotnetcore.ts b/Tasks/DotNetCoreCLIV2/dotnetcore.ts index d30c33978713..97088c92924d 100644 --- a/Tasks/DotNetCoreCLIV2/dotnetcore.ts +++ b/Tasks/DotNetCoreCLIV2/dotnetcore.ts @@ -250,7 +250,7 @@ export class dotNetExe { } private extractOutputArgument(): void { - if (!this.arguments || !this.arguments.trim()) { + if (!this.arguments || !this.arguments.trim()) { return; } @@ -334,7 +334,7 @@ export class dotNetExe { }); if (!projectFiles.length) { - tl.error(tl.loc("noWebProjctFound")); + tl.error(tl.loc("noWebProjectFound")); } } diff --git a/Tasks/DotNetCoreCLIV2/task.json b/Tasks/DotNetCoreCLIV2/task.json index 633cecc27d98..b6c8af2e7289 100644 --- a/Tasks/DotNetCoreCLIV2/task.json +++ b/Tasks/DotNetCoreCLIV2/task.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 154, - "Patch": 3 + "Patch": 4 }, "minimumAgentVersion": "2.115.0", "instanceNameFormat": "dotnet $(command)", @@ -529,7 +529,7 @@ "dotnetCommandFailed": "Dotnet command failed with non-zero exit code on the following projects : %s", "noProjectFilesFound": "Project file(s) matching the specified pattern were not found.", "noPublishFolderFoundToZip": "A publish folder could not be found to zip for project file: %s.", - "noWebProjctFound": "No web project was found in the repository. Web projects are identified by presence of either a web.config file or wwwroot folder in the directory.", + "noWebProjectFound": "No web project was found in the repository. Web projects are identified by presence of either a web.config file or wwwroot folder in the directory. You can uncheck `Publish Web Projects` if your project doesn't follow the aforementioned web project criteria.", "zipFailed": "Zip failed with error: %s", "Error_ApiKeyNotSupported": "DotNetCore currently does not support using an encrypted Api Key.", "Error_ExpectedConfigurationElement": "Invalid xml. Expected element named 'configuration'.", @@ -559,4 +559,4 @@ "Warning_SessionCreationFailed": "Could not create provenance session: %s", "Warning_UpdatingNuGetVersion": "Updating version of NuGet.exe to %s from %s. Behavior changes or breaking changes might occur as NuGet updates to a new version. If this is not desired, deselect the 'Check for Latest Version' option in the task." } -} +} \ No newline at end of file diff --git a/Tasks/DotNetCoreCLIV2/task.loc.json b/Tasks/DotNetCoreCLIV2/task.loc.json index 3e5bf7a5c93f..00d50e01a258 100644 --- a/Tasks/DotNetCoreCLIV2/task.loc.json +++ b/Tasks/DotNetCoreCLIV2/task.loc.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 154, - "Patch": 3 + "Patch": 4 }, "minimumAgentVersion": "2.115.0", "instanceNameFormat": "ms-resource:loc.instanceNameFormat", @@ -529,7 +529,7 @@ "dotnetCommandFailed": "ms-resource:loc.messages.dotnetCommandFailed", "noProjectFilesFound": "ms-resource:loc.messages.noProjectFilesFound", "noPublishFolderFoundToZip": "ms-resource:loc.messages.noPublishFolderFoundToZip", - "noWebProjctFound": "ms-resource:loc.messages.noWebProjctFound", + "noWebProjectFound": "ms-resource:loc.messages.noWebProjectFound", "zipFailed": "ms-resource:loc.messages.zipFailed", "Error_ApiKeyNotSupported": "ms-resource:loc.messages.Error_ApiKeyNotSupported", "Error_ExpectedConfigurationElement": "ms-resource:loc.messages.Error_ExpectedConfigurationElement", From b22ea181e539edb52281b96469e0bb99b0f82e2f Mon Sep 17 00:00:00 2001 From: Himanshu Yadav Date: Thu, 20 Jun 2019 11:26:43 +0530 Subject: [PATCH 2/2] updated error message as per PR comment. --- .../Strings/resources.resjson/en-US/resources.resjson | 2 +- Tasks/DotNetCoreCLIV2/task.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Tasks/DotNetCoreCLIV2/Strings/resources.resjson/en-US/resources.resjson b/Tasks/DotNetCoreCLIV2/Strings/resources.resjson/en-US/resources.resjson index 8bee45cf9e30..dc7aaaf05254 100644 --- a/Tasks/DotNetCoreCLIV2/Strings/resources.resjson/en-US/resources.resjson +++ b/Tasks/DotNetCoreCLIV2/Strings/resources.resjson/en-US/resources.resjson @@ -103,7 +103,7 @@ "loc.messages.dotnetCommandFailed": "Dotnet command failed with non-zero exit code on the following projects : %s", "loc.messages.noProjectFilesFound": "Project file(s) matching the specified pattern were not found.", "loc.messages.noPublishFolderFoundToZip": "A publish folder could not be found to zip for project file: %s.", - "loc.messages.noWebProjectFound": "No web project was found in the repository. Web projects are identified by presence of either a web.config file or wwwroot folder in the directory. You can uncheck `Publish Web Projects` if your project doesn't follow the aforementioned web project criteria.", + "loc.messages.noWebProjectFound": "No web project was found in the repository. Web projects are identified by presence of either a web.config file or wwwroot folder in the directory. You can set Publish Web Projects property to false (publishWebProjects: false in yml) if your project doesn't follow this convention or if you want to publish projects other than web projects.", "loc.messages.zipFailed": "Zip failed with error: %s", "loc.messages.Error_ApiKeyNotSupported": "DotNetCore currently does not support using an encrypted Api Key.", "loc.messages.Error_ExpectedConfigurationElement": "Invalid xml. Expected element named 'configuration'.", diff --git a/Tasks/DotNetCoreCLIV2/task.json b/Tasks/DotNetCoreCLIV2/task.json index b6c8af2e7289..05b825dfc972 100644 --- a/Tasks/DotNetCoreCLIV2/task.json +++ b/Tasks/DotNetCoreCLIV2/task.json @@ -529,7 +529,7 @@ "dotnetCommandFailed": "Dotnet command failed with non-zero exit code on the following projects : %s", "noProjectFilesFound": "Project file(s) matching the specified pattern were not found.", "noPublishFolderFoundToZip": "A publish folder could not be found to zip for project file: %s.", - "noWebProjectFound": "No web project was found in the repository. Web projects are identified by presence of either a web.config file or wwwroot folder in the directory. You can uncheck `Publish Web Projects` if your project doesn't follow the aforementioned web project criteria.", + "noWebProjectFound": "No web project was found in the repository. Web projects are identified by presence of either a web.config file or wwwroot folder in the directory. You can set Publish Web Projects property to false (publishWebProjects: false in yml) if your project doesn't follow this convention or if you want to publish projects other than web projects.", "zipFailed": "Zip failed with error: %s", "Error_ApiKeyNotSupported": "DotNetCore currently does not support using an encrypted Api Key.", "Error_ExpectedConfigurationElement": "Invalid xml. Expected element named 'configuration'.",