diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d5fa84cd..c30b65227 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,27 @@ - Diagnostics related feature requests and improvements [#5951](https://github.com/dotnet/vscode-csharp/issues/5951) - Debug from .csproj and .sln [#5876](https://github.com/dotnet/vscode-csharp/issues/5876) +# Latest +* Update Roslyn to 4.13.0-1.24518.1 (PR: [#7670](https://github.com/dotnet/vscode-csharp/pull/7670)) + * Fix issue where server sometimes crashed when saving new C# file for the first time (PR: [#75509](https://github.com/dotnet/roslyn/pull/75509)) + * Report LSP loading telemetry (PR: [#75402](https://github.com/dotnet/roslyn/pull/75402)) +* Bumped xamlTools to 17.13.35414.86 (PR: [#7664](https://github.com/dotnet/vscode-csharp/pull/7664)) +* Escape code block in changelog (PR: [#7665](https://github.com/dotnet/vscode-csharp/pull/7665)) +* Lookup Razor file context using its document uri. (PR: [#7663](https://github.com/dotnet/vscode-csharp/pull/7663)) +* Update razor to 9.0.0-preview.24516.1 (PR: [#7667](https://github.com/dotnet/vscode-csharp/pull/7667)) + * Add CLaSP Request Tracking (PR: [#11015](https://github.com/dotnet/razor/pull/11015)) + * Fix potentially ambiguous System.Object in _Imports.razor (PR: [#10999](https://github.com/dotnet/razor/pull/10999)) + * Fix nullability to match specification (PR: [#11003](https://github.com/dotnet/razor/pull/11003)) + * Recognize `_Imports.razor` in the source generator (PR: [#10992](https://github.com/dotnet/razor/pull/10992)) + * Fix @inherits mapping for fuse (PR: [#10985](https://github.com/dotnet/razor/pull/10985)) + * Fix project publish (or: Various project system fixes) (PR: [#10983](https://github.com/dotnet/razor/pull/10983)) + * Emit and map empty csharp tokens (PR: [#10969](https://github.com/dotnet/razor/pull/10969)) + * Fix Generate Event Handler code action (PR: [#10967](https://github.com/dotnet/razor/pull/10967)) + * Add IProjectSnapshot.ContainsDocument to test document paths cheaply (PR: [#10975](https://github.com/dotnet/razor/pull/10975)) + * Refresh diagnostics on project changes (PR: [#10964](https://github.com/dotnet/razor/pull/10964)) + * Don't throw if we get an old/bad Inlay Hint request (PR: [#10968](https://github.com/dotnet/razor/pull/10968)) + * Fix on type formatting (PR: [#10949](https://github.com/dotnet/razor/pull/10949)) + # 2.52.x * Add miscellaneous file open notifications (PR: [#7652](https://github.com/dotnet/vscode-csharp/pull/7652)) * Require at least version 8.0.10 of the .net runtime (PR: [#7651](https://github.com/dotnet/vscode-csharp/pull/7651)) @@ -38,7 +59,7 @@ # 2.50.25 * Update Roslyn to 4.13.0-1.24477.2 (PR: [#<>](https://github.com/dotnet/vscode-csharp/pull/<>)) * Use MSBuild globs to determine which file changes are relevant (PR: [#75139](https://github.com/dotnet/roslyn/pull/75139)) - * Allow in DocComments to render as a block in Hover response (PR: [#75215](https://github.com/dotnet/roslyn/pull/75215)) + * Allow `` in DocComments to render as a block in Hover response (PR: [#75215](https://github.com/dotnet/roslyn/pull/75215)) * Ignore irrelevant exceptions when reporting LSP server NFW (PR: [#75150](https://github.com/dotnet/roslyn/pull/75150)) * Bumped xamltools to 17.12.35326.17 (PR: [#7610](https://github.com/dotnet/vscode-csharp/pull/7610)) * Do not remove documents if they are not files (PR: [#7607](https://github.com/dotnet/vscode-csharp/pull/7607)) diff --git a/l10n/bundle.l10n.cs.json b/l10n/bundle.l10n.cs.json index c29bf5999..944c2b25f 100644 --- a/l10n/bundle.l10n.cs.json +++ b/l10n/bundle.l10n.cs.json @@ -42,7 +42,7 @@ "Description of the problem": "Popis problému", "Detected change in telemetry settings. These will not take effect until the language server is restarted, would you like to restart?": "Zjistila se změna v nastavení telemetrie. Tyto změny se projeví až po restartování jazykového serveru. Chcete ho restartovat?", "Disable message in settings": "Zakázat zprávu v nastavení", - "Dismiss": "Dismiss", + "Dismiss": "Zrušit", "Do not load any": "Nic nenačítat", "Do not show for this workspace": "Do not show for this workspace", "Does not contain .NET Core projects.": "Neobsahuje projekty .NET Core.", diff --git a/l10n/bundle.l10n.de.json b/l10n/bundle.l10n.de.json index 06f5cd8e3..d468ae15d 100644 --- a/l10n/bundle.l10n.de.json +++ b/l10n/bundle.l10n.de.json @@ -42,7 +42,7 @@ "Description of the problem": "Beschreibung des Problems", "Detected change in telemetry settings. These will not take effect until the language server is restarted, would you like to restart?": "Es wurde eine Änderung der Telemetrieeinstellungen erkannt. Diese werden erst wirksam, nachdem der Sprachserver neu gestartet wurde. Möchten Sie einen Neustart durchführen?", "Disable message in settings": "Nachricht in Einstellungen deaktivieren", - "Dismiss": "Dismiss", + "Dismiss": "Schließen", "Do not load any": "Keine laden", "Do not show for this workspace": "Do not show for this workspace", "Does not contain .NET Core projects.": "Enthält keine .NET Core-Projekte.", diff --git a/l10n/bundle.l10n.es.json b/l10n/bundle.l10n.es.json index 79498340b..903e68858 100644 --- a/l10n/bundle.l10n.es.json +++ b/l10n/bundle.l10n.es.json @@ -42,7 +42,7 @@ "Description of the problem": "Descripción del problema", "Detected change in telemetry settings. These will not take effect until the language server is restarted, would you like to restart?": "Se detectó un cambio en la configuración de telemetría. Estos no surtirán efecto hasta que se reinicie el servidor de idioma. ¿Desea reiniciarlo?", "Disable message in settings": "Deshabilitar mensaje en la configuración", - "Dismiss": "Dismiss", + "Dismiss": "Descartar", "Do not load any": "No cargar ninguno", "Do not show for this workspace": "Do not show for this workspace", "Does not contain .NET Core projects.": "No contiene proyectos de .NET Core.", diff --git a/l10n/bundle.l10n.fr.json b/l10n/bundle.l10n.fr.json index f0ac1ec13..97a6c61e6 100644 --- a/l10n/bundle.l10n.fr.json +++ b/l10n/bundle.l10n.fr.json @@ -42,7 +42,7 @@ "Description of the problem": "Description du problème", "Detected change in telemetry settings. These will not take effect until the language server is restarted, would you like to restart?": "Détection d’une modification des paramètres de télémétrie. Celles-ci ne prendront effet qu’après le redémarrage du serveur de langue. Voulez-vous redémarrer ?", "Disable message in settings": "Désactiver le message dans les paramètres", - "Dismiss": "Dismiss", + "Dismiss": "Ignorer", "Do not load any": "Ne charger aucun", "Do not show for this workspace": "Do not show for this workspace", "Does not contain .NET Core projects.": "Ne contient pas de projets .NET Core.", diff --git a/l10n/bundle.l10n.it.json b/l10n/bundle.l10n.it.json index a8e7c3338..e15064dcc 100644 --- a/l10n/bundle.l10n.it.json +++ b/l10n/bundle.l10n.it.json @@ -42,7 +42,7 @@ "Description of the problem": "Descrizione del problema", "Detected change in telemetry settings. These will not take effect until the language server is restarted, would you like to restart?": "Modifica rilevata nelle impostazioni di telemetria. Queste impostazioni avranno effetto solo dopo il riavvio del server di lingua. Riavviare?", "Disable message in settings": "Disabilita messaggio nelle impostazioni", - "Dismiss": "Dismiss", + "Dismiss": "Chiudi", "Do not load any": "Non caricare", "Do not show for this workspace": "Do not show for this workspace", "Does not contain .NET Core projects.": "Non contiene progetti .NET Core.", diff --git a/l10n/bundle.l10n.ja.json b/l10n/bundle.l10n.ja.json index 2aee4fa52..cf0e7134b 100644 --- a/l10n/bundle.l10n.ja.json +++ b/l10n/bundle.l10n.ja.json @@ -42,7 +42,7 @@ "Description of the problem": "問題の説明", "Detected change in telemetry settings. These will not take effect until the language server is restarted, would you like to restart?": "テレメトリ設定の変更が検出されました。言語サーバーが再起動されるまで、これらは有効になりません。再起動しますか?", "Disable message in settings": "設定でメッセージを無効にする", - "Dismiss": "Dismiss", + "Dismiss": "無視", "Do not load any": "何も読み込まない", "Do not show for this workspace": "Do not show for this workspace", "Does not contain .NET Core projects.": ".NET Core プロジェクトが含まれていません。", diff --git a/l10n/bundle.l10n.ko.json b/l10n/bundle.l10n.ko.json index 5d227942b..ded7eed9f 100644 --- a/l10n/bundle.l10n.ko.json +++ b/l10n/bundle.l10n.ko.json @@ -42,9 +42,9 @@ "Description of the problem": "문제 설명", "Detected change in telemetry settings. These will not take effect until the language server is restarted, would you like to restart?": "원격 분석 설정에서 변경 사항이 감지되었습니다. 언어 서버가 다시 시작될 때까지 적용되지 않습니다. 다시 시작하시겠습니까?", "Disable message in settings": "설정에서 메시지 비활성화", - "Dismiss": "Dismiss", + "Dismiss": "해제", "Do not load any": "로드 안 함", - "Do not show for this workspace": "Do not show for this workspace", + "Do not show for this workspace": "이 작업 영역에 대해 표시 안 함", "Does not contain .NET Core projects.": ".NET Core 프로젝트가 포함되어 있지 않습니다.", "Don't Ask Again": "다시 묻지 않음", "Download Mono": "Mono 다운로드", @@ -158,7 +158,7 @@ "The C# extension for Visual Studio Code is incompatible on {0} {1}.": "Visual Studio Code의 C# 확장이 {0} {1}에서 호환되지 않습니다.", "The C# extension is still downloading packages. Please see progress in the output window below.": "C# 확장이 여전히 패키지를 다운로드하고 있습니다. 아래 출력 창에서 진행 상황을 확인하세요.", "The C# extension was unable to automatically decode projects in the current workspace to create a runnable launch.json file. A template launch.json file has been created as a placeholder.\r\n\r\nIf the server is currently unable to load your project, you can attempt to resolve this by restoring any missing project dependencies (example: run 'dotnet restore') and by fixing any reported errors from building the projects in your workspace.\r\nIf this allows the server to now load your project then --\r\n * Delete this file\r\n * Open the Visual Studio Code command palette (View->Command Palette)\r\n * run the command: '.NET: Generate Assets for Build and Debug'.\r\n\r\nIf your project requires a more complex launch configuration, you may wish to delete this configuration and pick a different template using the 'Add Configuration...' button at the bottom of this file.": "C# 확장은 실행 가능한 launch.json 파일을 만들기 위해 현재 작업 영역에서 프로젝트를 자동으로 디코딩할 수 없습니다. 템플릿 launch.json 파일이 자리 표시자로 생성되었습니다.\r\n\r\n현재 서버에서 프로젝트를 로드할 수 없는 경우 누락된 프로젝트 종속성을 복원하고(예: 'dotnet restore' 실행) 작업 영역에서 프로젝트를 빌드할 때 보고된 오류를 수정하여 이 문제를 해결할 수 있습니다.\r\n이렇게 하면 서버가 이제 프로젝트를 로드할 수 있습니다.\r\n * 이 파일 삭제\r\n * Visual Studio Code 명령 팔레트 열기(보기->명령 팔레트)\r\n * '.NET: 빌드 및 디버그용 자산 생성' 명령을 실행합니다.\r\n\r\n프로젝트에 보다 복잡한 시작 구성이 필요한 경우 이 구성을 삭제하고 이 파일 하단의 '구성 추가...' 버튼을 사용하여 다른 템플릿을 선택할 수 있습니다.", - "The active document is not part of the open workspace. Not all language features will be available.": "The active document is not part of the open workspace. Not all language features will be available.", + "The active document is not part of the open workspace. Not all language features will be available.": "활성 문서는 열려 있는 작업 영역의 일부가 아닙니다. 일부 언어 기능을 사용할 수 없습니다.", "The selected launch configuration is configured to launch a web browser but no trusted development certificate was found. Create a trusted self-signed certificate?": "선택한 시작 구성이 웹 브라우저를 시작하도록 구성되었지만 신뢰할 수 있는 개발 인증서를 찾을 수 없습니다. 신뢰할 수 있는 자체 서명 인증서를 만드시겠습니까?", "The value '{0}' for 'targetArchitecture' in launch configuraiton is invalid. Expected 'x86_64' or 'arm64'.": "시작 구성의 'targetArchitecture'의 '{0}' 값이 잘못되었습니다. 'x86_64' 또는 'arm64'가 필요합니다.", "There are unresolved dependencies. Please execute the restore command to continue.": "확인되지 않은 종속성이 있습니다. 계속하려면 복원 명령을 실행하세요.", diff --git a/l10n/bundle.l10n.pl.json b/l10n/bundle.l10n.pl.json index 1e341eb9b..b1ebcf8b9 100644 --- a/l10n/bundle.l10n.pl.json +++ b/l10n/bundle.l10n.pl.json @@ -42,7 +42,7 @@ "Description of the problem": "Opis problemu", "Detected change in telemetry settings. These will not take effect until the language server is restarted, would you like to restart?": "Wykryto zmianę ustawień telemetrii. Te zmiany zaczną obowiązywać dopiero po ponownym uruchomieniu serwera językowego. Czy chcesz ponownie uruchomić?", "Disable message in settings": "Wyłącz komunikat w ustawieniach", - "Dismiss": "Dismiss", + "Dismiss": "Odrzuć", "Do not load any": "Nie ładuj żadnych", "Do not show for this workspace": "Do not show for this workspace", "Does not contain .NET Core projects.": "Nie zawiera projektów platformy .NET Core.", diff --git a/l10n/bundle.l10n.pt-br.json b/l10n/bundle.l10n.pt-br.json index 42ef9bc77..b6eb5d5f1 100644 --- a/l10n/bundle.l10n.pt-br.json +++ b/l10n/bundle.l10n.pt-br.json @@ -42,9 +42,9 @@ "Description of the problem": "Descrição do problema", "Detected change in telemetry settings. These will not take effect until the language server is restarted, would you like to restart?": "Alteração detectada nas configurações de telemetria. Eles não entrarão em vigor até que o servidor de idiomas seja reiniciado, quer reiniciar?", "Disable message in settings": "Desabilitar uma mensagem nas configurações", - "Dismiss": "Dismiss", + "Dismiss": "Ignorar", "Do not load any": "Não carregue nenhum", - "Do not show for this workspace": "Do not show for this workspace", + "Do not show for this workspace": "Não mostrar para este workspace", "Does not contain .NET Core projects.": "Não contém projetos do .NET Core.", "Don't Ask Again": "Não perguntar novamente", "Download Mono": "Baixar Mono", @@ -158,7 +158,7 @@ "The C# extension for Visual Studio Code is incompatible on {0} {1}.": "A extensão C# para Visual Studio Code é incompatível no {0} {1}.", "The C# extension is still downloading packages. Please see progress in the output window below.": "A extensão C# ainda está baixando pacotes. Veja o progresso na janela de saída abaixo.", "The C# extension was unable to automatically decode projects in the current workspace to create a runnable launch.json file. A template launch.json file has been created as a placeholder.\r\n\r\nIf the server is currently unable to load your project, you can attempt to resolve this by restoring any missing project dependencies (example: run 'dotnet restore') and by fixing any reported errors from building the projects in your workspace.\r\nIf this allows the server to now load your project then --\r\n * Delete this file\r\n * Open the Visual Studio Code command palette (View->Command Palette)\r\n * run the command: '.NET: Generate Assets for Build and Debug'.\r\n\r\nIf your project requires a more complex launch configuration, you may wish to delete this configuration and pick a different template using the 'Add Configuration...' button at the bottom of this file.": "A extensão C# não conseguiu decodificar projetos automaticamente no workspace atual para criar um arquivo launch.json executável. Um modelo de arquivo launch.json foi criado como um espaço reservado.\r\n\r\nSe o servidor não estiver sendo capaz de carregar seu projeto no momento, você pode tentar resolver isso restaurando as dependências ausentes do projeto (por exemplo: executar \"dotnet restore\") e corrigindo quaisquer erros notificados com relação à compilação dos projetos no seu workspace.\r\nSe isso permitir que o servidor consiga carregar o projeto agora:\r\n * Exclua esse arquivo\r\n * Abra a paleta de comandos do Visual Studio Code (Ver->Paleta de Comandos)\r\n * execute o comando: \".NET: Generate Assets for Build and Debug\".\r\n\r\nSe o seu projeto requerer uma configuração de inicialização mais complexa, talvez você queira excluir essa configuração e escolher um modelo diferente usando o botão \"Adicionar Configuração...\" na parte inferior desse arquivo.", - "The active document is not part of the open workspace. Not all language features will be available.": "The active document is not part of the open workspace. Not all language features will be available.", + "The active document is not part of the open workspace. Not all language features will be available.": "O documento ativo não faz parte do workspace aberto. Nem todos os recursos de linguagem estarão disponíveis.", "The selected launch configuration is configured to launch a web browser but no trusted development certificate was found. Create a trusted self-signed certificate?": "A configuração de inicialização selecionada está configurada para iniciar um navegador da web, mas nenhum certificado de desenvolvimento confiável foi encontrado. Deseja criar um certificado autoassinado confiável?", "The value '{0}' for 'targetArchitecture' in launch configuraiton is invalid. Expected 'x86_64' or 'arm64'.": "O valor “{0}” para “targetArchitecture” na configuração de inicialização é inválido. Esperado “x86_64” ou “arm64”.", "There are unresolved dependencies. Please execute the restore command to continue.": "Há dependências não resolvidas. Execute o comando de restauração para continuar.", diff --git a/l10n/bundle.l10n.ru.json b/l10n/bundle.l10n.ru.json index 22988b622..af7441833 100644 --- a/l10n/bundle.l10n.ru.json +++ b/l10n/bundle.l10n.ru.json @@ -42,7 +42,7 @@ "Description of the problem": "Описание проблемы", "Detected change in telemetry settings. These will not take effect until the language server is restarted, would you like to restart?": "Обнаружено изменение параметров телеметрии. Они вступят в силу только после перезапуска языкового сервера. Выполнить перезапуск?", "Disable message in settings": "Отключить сообщение в параметрах", - "Dismiss": "Dismiss", + "Dismiss": "Отклонить", "Do not load any": "Не загружать", "Do not show for this workspace": "Do not show for this workspace", "Does not contain .NET Core projects.": "Не содержит проектов .NET Core.", diff --git a/l10n/bundle.l10n.tr.json b/l10n/bundle.l10n.tr.json index 2e9671800..08a8f42fa 100644 --- a/l10n/bundle.l10n.tr.json +++ b/l10n/bundle.l10n.tr.json @@ -42,7 +42,7 @@ "Description of the problem": "Sorunun açıklaması", "Detected change in telemetry settings. These will not take effect until the language server is restarted, would you like to restart?": "Telemetri ayarlarında değişiklik algılandı. Bunlar dil sunucusu yeniden başlatılana kadar etkili olmayacaktır, yeniden başlatmak ister misiniz?", "Disable message in settings": "Ayarlarda iletiyi devre dışı bırakma", - "Dismiss": "Dismiss", + "Dismiss": "Kapat", "Do not load any": "Hiçbir şey yükleme", "Do not show for this workspace": "Do not show for this workspace", "Does not contain .NET Core projects.": ".NET Core projeleri içermiyor.", diff --git a/l10n/bundle.l10n.zh-cn.json b/l10n/bundle.l10n.zh-cn.json index 330b07289..6c995cd90 100644 --- a/l10n/bundle.l10n.zh-cn.json +++ b/l10n/bundle.l10n.zh-cn.json @@ -42,7 +42,7 @@ "Description of the problem": "问题说明", "Detected change in telemetry settings. These will not take effect until the language server is restarted, would you like to restart?": "检测到遥测设置发生更改。这些更改只有在语言服务器重启后才会生效,是否要重启?", "Disable message in settings": "在设置中禁用消息", - "Dismiss": "Dismiss", + "Dismiss": "关闭", "Do not load any": "请勿加载任何", "Do not show for this workspace": "Do not show for this workspace", "Does not contain .NET Core projects.": "不包含 .NET Core 项目。", diff --git a/l10n/bundle.l10n.zh-tw.json b/l10n/bundle.l10n.zh-tw.json index 7d2ffe659..dc1bb5939 100644 --- a/l10n/bundle.l10n.zh-tw.json +++ b/l10n/bundle.l10n.zh-tw.json @@ -42,7 +42,7 @@ "Description of the problem": "問題的描述", "Detected change in telemetry settings. These will not take effect until the language server is restarted, would you like to restart?": "偵測到遙測設定中的變更。在重新啟動語言伺服器之前,這些將不會生效,是否要重新啟動?", "Disable message in settings": "停用設定中的訊息", - "Dismiss": "Dismiss", + "Dismiss": "關閉", "Do not load any": "不要載入", "Do not show for this workspace": "Do not show for this workspace", "Does not contain .NET Core projects.": "不包含 .NET Core 專案。", diff --git a/package.json b/package.json index af383a387..982c4347f 100644 --- a/package.json +++ b/package.json @@ -37,11 +37,11 @@ } }, "defaults": { - "roslyn": "4.13.0-1.24511.1", + "roslyn": "4.13.0-1.24518.1", "omniSharp": "1.39.11", - "razor": "9.0.0-preview.24480.1", + "razor": "9.0.0-preview.24516.1", "razorOmnisharp": "7.0.0-preview.23363.1", - "xamlTools": "17.12.35403.211" + "xamlTools": "17.13.35414.86" }, "main": "./dist/extension", "l10n": "./l10n", diff --git a/package.nls.ko.json b/package.nls.ko.json index 6d606e2f5..57c87595d 100644 --- a/package.nls.ko.json +++ b/package.nls.ko.json @@ -68,7 +68,7 @@ "configuration.dotnet.server.path": "서버(LSP 또는 O#) 실행 파일의 절대 경로를 지정합니다. 비어 있으면 C# 확장에 고정된 버전이 사용됩니다(이전 `omnisharp.path`).", "configuration.dotnet.server.startTimeout": "클라이언트가 언어 서버를 시작하고 연결하기 위한 시간 제한(밀리초)을 지정합니다.", "configuration.dotnet.server.suppressLspErrorToasts": "서버에서 복구 가능한 오류가 발생하는 경우 오류 알림이 표시되지 않도록 합니다.", - "configuration.dotnet.server.suppressMiscellaneousFilesToasts": "Suppress warning toasts from showing up if the active document is outside the open workspace.", + "configuration.dotnet.server.suppressMiscellaneousFilesToasts": "활성 문서가 열려 있는 작업 영역 밖에 있는 경우 경고 알림이 표시되지 않도록 합니다.", "configuration.dotnet.server.trace": "언어 서버의 로깅 수준을 설정합니다.", "configuration.dotnet.server.useServerGC": ".NET 서버 가비지 수집을 사용하도록 언어 서버를 구성합니다. 서버 가비지 수집은 일반적으로 메모리 사용량이 많을수록 성능이 향상됩니다.", "configuration.dotnet.server.waitForDebugger": "디버거 연결을 허용하기 위해 서버를 시작할 때 --debug 플래그를 전달합니다(이전 `omnisharp.waitForDebugger`).", diff --git a/package.nls.pt-br.json b/package.nls.pt-br.json index 663111e31..b2d572c40 100644 --- a/package.nls.pt-br.json +++ b/package.nls.pt-br.json @@ -68,7 +68,7 @@ "configuration.dotnet.server.path": "Especifica o caminho absoluto para o executável do servidor (LSP ou O#). Quando deixado em branco, a versão fixada na extensão C# é usada. (Anteriormente `omnisharp.path`)", "configuration.dotnet.server.startTimeout": "Especifica um tempo limite (em ms) para o cliente iniciar e conectar-se com êxito ao servidor de idioma.", "configuration.dotnet.server.suppressLspErrorToasts": "Suprime a exibição de notificações do erro se o servidor encontrar um erro recuperável.", - "configuration.dotnet.server.suppressMiscellaneousFilesToasts": "Suppress warning toasts from showing up if the active document is outside the open workspace.", + "configuration.dotnet.server.suppressMiscellaneousFilesToasts": "Suprima a exibição de notificações de aviso do sistema se o documento ativo estiver fora do workspace aberto.", "configuration.dotnet.server.trace": "Define o nível de log para o servidor de idiomas", "configuration.dotnet.server.useServerGC": "Configure o servidor de linguagem para usar a coleta de lixo do servidor do .NET. A coleta de lixo do servidor geralmente fornece um melhor desempenho às custas de um consumo de memória mais alto.", "configuration.dotnet.server.waitForDebugger": "Passa o sinalizador --debug ao iniciar o servidor para permitir que um depurador seja anexado. (Anteriormente `omnisharp.waitForDebugger`)", diff --git a/src/lsptoolshost/miscellaneousFileNotifier.ts b/src/lsptoolshost/miscellaneousFileNotifier.ts index 0cec79154..71e550668 100644 --- a/src/lsptoolshost/miscellaneousFileNotifier.ts +++ b/src/lsptoolshost/miscellaneousFileNotifier.ts @@ -18,8 +18,12 @@ export function registerMiscellaneousFileNotifier( languageServer: RoslynLanguageServer ) { languageServer._projectContextService.onActiveFileContextChanged((e) => { - // Only warn for miscellaneous files when the workspace is fully initialized. - if (!e.context._vs_is_miscellaneous || languageServer.state !== ServerState.ProjectInitializationComplete) { + // Only warn for C# miscellaneous files when the workspace is fully initialized. + if ( + e.languageId !== 'csharp' || + !e.context._vs_is_miscellaneous || + languageServer.state !== ServerState.ProjectInitializationComplete + ) { return; } diff --git a/src/lsptoolshost/services/projectContextService.ts b/src/lsptoolshost/services/projectContextService.ts index 4a5ef0a10..be4a4b17a 100644 --- a/src/lsptoolshost/services/projectContextService.ts +++ b/src/lsptoolshost/services/projectContextService.ts @@ -10,11 +10,9 @@ import { TextDocumentIdentifier } from 'vscode-languageserver-protocol'; import { UriConverter } from '../uriConverter'; import { LanguageServerEvents } from '../languageServerEvents'; import { ServerState } from '../serverStateChange'; -import { DynamicFileInfoHandler } from '../../razor/src/dynamicFile/dynamicFileInfoHandler'; -import { ProvideDynamicFileResponse } from '../../razor/src/dynamicFile/provideDynamicFileResponse'; -import { ProvideDynamicFileParams } from '../../razor/src/dynamicFile/provideDynamicFileParams'; export interface ProjectContextChangeEvent { + languageId: string; uri: vscode.Uri; context: VSProjectContext; } @@ -57,44 +55,21 @@ export class ProjectContextService { this._source.cancel(); this._source = new vscode.CancellationTokenSource(); - let uri = textEditor!.document.uri; + const uri = textEditor!.document.uri; if (!this._languageServer.isRunning()) { - this._contextChangeEmitter.fire({ uri, context: this._emptyProjectContext }); + this._contextChangeEmitter.fire({ languageId, uri, context: this._emptyProjectContext }); return; } - // If the active document is a Razor file, we need to map it back to a C# file. - if (languageId === 'aspnetcorerazor') { - const virtualUri = await this.getVirtualCSharpUri(uri); - if (!virtualUri) { - return; - } - - uri = virtualUri; - } - const contextList = await this.getProjectContexts(uri, this._source.token); if (!contextList) { + this._contextChangeEmitter.fire({ languageId, uri, context: this._emptyProjectContext }); return; } const context = contextList._vs_projectContexts[contextList._vs_defaultIndex]; - this._contextChangeEmitter.fire({ uri, context }); - } - - private async getVirtualCSharpUri(uri: vscode.Uri): Promise { - const response = await vscode.commands.executeCommand( - DynamicFileInfoHandler.provideDynamicFileInfoCommand, - new ProvideDynamicFileParams({ uri: UriConverter.serialize(uri) }) - ); - - const responseUri = response.csharpDocument?.uri; - if (!responseUri) { - return undefined; - } - - return UriConverter.deserialize(responseUri); + this._contextChangeEmitter.fire({ languageId, uri, context }); } private async getProjectContexts( diff --git a/version.json b/version.json index 719a2ee4e..88d1c2c19 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", - "version": "2.52", + "version": "2.53", "publicReleaseRefSpec": [ "^refs/heads/release$", "^refs/heads/prerelease$",