From 61e3417587d0a3c508c4d1475ac0c78dc46511fa Mon Sep 17 00:00:00 2001 From: tmat Date: Mon, 16 Sep 2024 14:43:28 -0700 Subject: [PATCH] Include workspace kind in error message for easier diagnostics --- .../Portable/Workspace/Host/HostLanguageServices.cs | 5 ++++- .../Portable/Workspace/Host/HostWorkspaceServices.cs | 5 ++++- src/Workspaces/Core/Portable/WorkspacesResources.resx | 4 ++-- .../Core/Portable/xlf/WorkspacesResources.cs.xlf | 10 +++++----- .../Core/Portable/xlf/WorkspacesResources.de.xlf | 10 +++++----- .../Core/Portable/xlf/WorkspacesResources.es.xlf | 10 +++++----- .../Core/Portable/xlf/WorkspacesResources.fr.xlf | 10 +++++----- .../Core/Portable/xlf/WorkspacesResources.it.xlf | 10 +++++----- .../Core/Portable/xlf/WorkspacesResources.ja.xlf | 10 +++++----- .../Core/Portable/xlf/WorkspacesResources.ko.xlf | 10 +++++----- .../Core/Portable/xlf/WorkspacesResources.pl.xlf | 10 +++++----- .../Core/Portable/xlf/WorkspacesResources.pt-BR.xlf | 10 +++++----- .../Core/Portable/xlf/WorkspacesResources.ru.xlf | 10 +++++----- .../Core/Portable/xlf/WorkspacesResources.tr.xlf | 10 +++++----- .../Core/Portable/xlf/WorkspacesResources.zh-Hans.xlf | 10 +++++----- .../Core/Portable/xlf/WorkspacesResources.zh-Hant.xlf | 10 +++++----- 16 files changed, 75 insertions(+), 69 deletions(-) diff --git a/src/Workspaces/Core/Portable/Workspace/Host/HostLanguageServices.cs b/src/Workspaces/Core/Portable/Workspace/Host/HostLanguageServices.cs index 99159021f2dff..5c34c161109f9 100644 --- a/src/Workspaces/Core/Portable/Workspace/Host/HostLanguageServices.cs +++ b/src/Workspaces/Core/Portable/Workspace/Host/HostLanguageServices.cs @@ -64,7 +64,10 @@ public TLanguageService GetRequiredService() where TLanguageSe var service = GetService(); if (service == null) { - throw new InvalidOperationException(string.Format(WorkspacesResources.Service_of_type_0_is_required_to_accomplish_the_task_but_is_not_available_from_the_workspace, typeof(TLanguageService))); + throw new InvalidOperationException( + string.Format(WorkspacesResources.Service_of_type_0_is_required_to_accomplish_the_task_but_is_not_available_from_1_workspace, + typeof(TLanguageService), + WorkspaceServices.Workspace.Kind)); } return service; diff --git a/src/Workspaces/Core/Portable/Workspace/Host/HostWorkspaceServices.cs b/src/Workspaces/Core/Portable/Workspace/Host/HostWorkspaceServices.cs index 0e360d99f30eb..979c1a96abed4 100644 --- a/src/Workspaces/Core/Portable/Workspace/Host/HostWorkspaceServices.cs +++ b/src/Workspaces/Core/Portable/Workspace/Host/HostWorkspaceServices.cs @@ -85,7 +85,10 @@ public TWorkspaceService GetRequiredService() where TWorkspac var service = GetService(); if (service == null) { - throw new InvalidOperationException(string.Format(WorkspacesResources.Service_of_type_0_is_required_to_accomplish_the_task_but_is_not_available_from_the_workspace, typeof(TWorkspaceService).FullName)); + throw new InvalidOperationException( + string.Format(WorkspacesResources.Service_of_type_0_is_required_to_accomplish_the_task_but_is_not_available_from_1_workspace, + typeof(TWorkspaceService), + Workspace.Kind)); } return service; diff --git a/src/Workspaces/Core/Portable/WorkspacesResources.resx b/src/Workspaces/Core/Portable/WorkspacesResources.resx index 9b87404617148..bd123c49ad251 100644 --- a/src/Workspaces/Core/Portable/WorkspacesResources.resx +++ b/src/Workspaces/Core/Portable/WorkspacesResources.resx @@ -312,8 +312,8 @@ Removing project references is not supported. - - Service of type '{0}' is required to accomplish the task but is not available from the workspace. + + Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace. At least one diagnostic must be supplied. diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.cs.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.cs.xlf index 4d94ad62481a3..8b8892a25c86a 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.cs.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.cs.xlf @@ -152,6 +152,11 @@ Spouští se čištění kódu u pevných dokumentů. + + Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace. + Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace. + + Solution does not contain specified reference Řešení neobsahuje zadaný odkaz. @@ -492,11 +497,6 @@ Odebírání odkazů na projekty se nepodporuje. - - Service of type '{0}' is required to accomplish the task but is not available from the workspace. - Ke splnění úkolu se vyžaduje služba typu {0}, není ale z pracovního prostoru dostupná. - - At least one diagnostic must be supplied. Musí se zadat aspoň jedna diagnostika. diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.de.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.de.xlf index 68b764580e04c..968961897d568 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.de.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.de.xlf @@ -152,6 +152,11 @@ Codebereinigung für feste Dokumente wird ausgeführt. + + Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace. + Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace. + + Solution does not contain specified reference Der angegebene Verweis ist nicht in der Projektmappe enthalten. @@ -492,11 +497,6 @@ Das Entfernen von Projektverweisen wird nicht unterstützt. - - Service of type '{0}' is required to accomplish the task but is not available from the workspace. - Ein Dienst vom Typ "{0}" ist zum Ausführen der Aufgabe erforderlich, steht aber im Arbeitsbereich nicht zur Verfügung. - - At least one diagnostic must be supplied. Es muss mindestens eine Diagnose bereitgestellt sein. diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.es.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.es.xlf index 4c5dcbad6fcd2..2d94e0825ec7e 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.es.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.es.xlf @@ -152,6 +152,11 @@ Ejecutando limpieza de código en documentos fijos + + Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace. + Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace. + + Solution does not contain specified reference La solución no contiene la referencia especificada @@ -492,11 +497,6 @@ No se permite quitar referencias de proyectos. - - Service of type '{0}' is required to accomplish the task but is not available from the workspace. - El servicio de tipo '{0}' es necesario para realizar la tarea, pero no está disponibles desde el área de trabajo. - - At least one diagnostic must be supplied. Se debe suministrar al menos un diagnóstico. diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.fr.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.fr.xlf index 7c11afadb30ef..9f6e3029f58f2 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.fr.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.fr.xlf @@ -152,6 +152,11 @@ Exécution du nettoyage du code sur des documents fixes + + Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace. + Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace. + + Solution does not contain specified reference La solution ne contient pas la référence spécifiée @@ -492,11 +497,6 @@ La suppression de références de projet n'est pas prise en charge. - - Service of type '{0}' is required to accomplish the task but is not available from the workspace. - Le service de type '{0}' est nécessaire pour accomplir la tâche mais n'est pas disponible dans l'espace de travail. - - At least one diagnostic must be supplied. Au moins un diagnostic doit être fourni. diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.it.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.it.xlf index b8c8dd6affac9..6e5c0cb8056ec 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.it.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.it.xlf @@ -152,6 +152,11 @@ Esecuzione della pulizia del codice nei documenti fissi + + Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace. + Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace. + + Solution does not contain specified reference La soluzione non contiene il riferimento specificato @@ -492,11 +497,6 @@ La rimozione di riferimenti al progetto non è supportata. - - Service of type '{0}' is required to accomplish the task but is not available from the workspace. - Per eseguire l'attività, è necessario il servizio di tipo '{0}', che però non è disponibile dall'area di lavoro. - - At least one diagnostic must be supplied. È necessario specificare almeno una diagnostica. diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ja.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ja.xlf index ca7e8ad4c8d1f..ca296c7ee7425 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ja.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ja.xlf @@ -152,6 +152,11 @@ 固定ドキュメントでコード クリーンアップを実行しています + + Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace. + Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace. + + Solution does not contain specified reference 指定された参照がソリューションに含まれていません @@ -492,11 +497,6 @@ プロジェクト参照の削除はサポートされていません。 - - Service of type '{0}' is required to accomplish the task but is not available from the workspace. - 型 '{0}' のサービスはタスクの実行に必要ですが、このワークスペースからは利用できません。 - - At least one diagnostic must be supplied. 1 つ以上の診断を指定しなければなりません。 diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ko.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ko.xlf index eff49c6c7e81c..08a5ceab89f91 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ko.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ko.xlf @@ -152,6 +152,11 @@ 고정된 문서에서 코드 정리 실행 중 + + Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace. + Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace. + + Solution does not contain specified reference 지정된 참조가 솔루션에 포함되어 있지 않습니다. @@ -492,11 +497,6 @@ 프로젝트 참조 제거는 지원되지 않습니다. - - Service of type '{0}' is required to accomplish the task but is not available from the workspace. - '{0}' 유형의 서비스가 작업을 수행하는 데 필요하지만 작업 영역에서 사용할 수 없습니다. - - At least one diagnostic must be supplied. 하나 이상의 진단을 제공해야 합니다. diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.pl.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.pl.xlf index 73c27e5a01c9c..31bc7ac3fe82d 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.pl.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.pl.xlf @@ -152,6 +152,11 @@ Uruchamianie oczyszczania kodu dla stałych dokumentów + + Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace. + Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace. + + Solution does not contain specified reference Rozwiązanie nie zawiera określonego odwołania @@ -492,11 +497,6 @@ Usuwanie odwołań projektów nie jest obsługiwane. - - Service of type '{0}' is required to accomplish the task but is not available from the workspace. - Usługa typu „{0}” jest wymagana do wykonania zadania, lecz nie jest dostępna w obszarze roboczym. - - At least one diagnostic must be supplied. Należy podać co najmniej jedną informację diagnostyczną. diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.pt-BR.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.pt-BR.xlf index d4623791d56d1..90295c27fe0ff 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.pt-BR.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.pt-BR.xlf @@ -152,6 +152,11 @@ Executando a limpeza de código em documentos fixos + + Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace. + Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace. + + Solution does not contain specified reference A solução não contém a referência especificada @@ -492,11 +497,6 @@ Não há suporte para a remoção de referências do projeto. - - Service of type '{0}' is required to accomplish the task but is not available from the workspace. - O serviço do tipo '{0}' é necessário para realizar a tarefa, mas não está disponível no workspace. - - At least one diagnostic must be supplied. No mínimo um diagnóstico deve ser fornecido. diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ru.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ru.xlf index 98221de788cdd..d3c4b9eb40e5c 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ru.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.ru.xlf @@ -152,6 +152,11 @@ Запуск очистки кода для фиксированных документов + + Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace. + Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace. + + Solution does not contain specified reference Решение не содержит указанную ссылку. @@ -492,11 +497,6 @@ Удаление ссылок на проекты не поддерживается. - - Service of type '{0}' is required to accomplish the task but is not available from the workspace. - Служба типа "{0}" необходима для выполнения задачи, но она недоступна из рабочей области. - - At least one diagnostic must be supplied. Необходимо указать по крайней мере одну диагностику. diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.tr.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.tr.xlf index f9df174cf9a32..a19e836734875 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.tr.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.tr.xlf @@ -152,6 +152,11 @@ Sabit belgelerde kod temizleme çalıştırılıyor + + Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace. + Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace. + + Solution does not contain specified reference Çözüm belirtilen başvuruyu içermiyor @@ -492,11 +497,6 @@ Proje başvurularının kaldırılması desteklenmiyor. - - Service of type '{0}' is required to accomplish the task but is not available from the workspace. - Görevi gerçekleştirmek için '{0}' türünde hizmet gerekli, ancak bu hizmet çalışma alanında yok. - - At least one diagnostic must be supplied. En az bir tanı sağlanmalıdır. diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hans.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hans.xlf index f470b5cbca67b..18ab32fd4301d 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hans.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hans.xlf @@ -152,6 +152,11 @@ 正在于固定文档上运行代码清理 + + Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace. + Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace. + + Solution does not contain specified reference 解决方案不包含指定的引用 @@ -492,11 +497,6 @@ 不支持删除项目引用。 - - Service of type '{0}' is required to accomplish the task but is not available from the workspace. - 完成任务需要“{0}”类型的服务,但无法从工作区中使用这样的服务。 - - At least one diagnostic must be supplied. 必须提供至少一个诊断。 diff --git a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hant.xlf b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hant.xlf index 6fe2a8e3634b5..36a42360c7878 100644 --- a/src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hant.xlf +++ b/src/Workspaces/Core/Portable/xlf/WorkspacesResources.zh-Hant.xlf @@ -152,6 +152,11 @@ 在固定文件上執行程式碼清除 + + Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace. + Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace. + + Solution does not contain specified reference 解決方案未包含指定的參考 @@ -492,11 +497,6 @@ 不支援移除專案參考。 - - Service of type '{0}' is required to accomplish the task but is not available from the workspace. - 完成工作需要 '{0}' 類型的服務,但是無法從工作區取得。 - - At least one diagnostic must be supplied. 至少必須提供一項診斷。