Quick fix 'Change namespace' missing in preview version
I maintainer di solito rispondono entro 1 giorno
Una pull request collegata è già stata integrata.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- csharp, typescript, vscode
- Ambito
- developer-experience, tooling
Direzione di ricerca
The payload names no source files, only the VS Code C# extension and the IDE0130 and IDE0161 diagnostics. Start by reproducing with a .cs file whose folder does not match its namespace, then compare the Quick Fix list on the Preview and Release channels. The code action is likely supplied by the Roslyn language server rather than this extension, so check which server version each channel ships. Done means the 'Change namespace to match folder structure' action appears on Preview, or the issue is routed to the upstream owner.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Environment data
dotnet --info output:
PS C:\Users\gvpundik\Source\Repos\UniOrder\unoiorder> d --info
ПАКЕТ SDK ДЛЯ .NET:
Version: 10.0.401
Commit: e34a38d2ae
Workload version: 10.0.400-manifests.63b36e85
MSBuild version: 18.9.11+e34a38d2a
Среда выполнения:
OS Name: Windows
OS Version: 10.0.19044
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\10.0.401\
Установленные рабочие нагрузки .NET:
Нет установленных рабочих нагрузок для отображения.
Настроено на использование workload sets при установке новых манифестов.
Наборы рабочих нагрузок не установлены. Запустите команду "dotnet workload restore", чтобы установить набор рабочей нагрузки.
Host:
Version: 10.0.12
Architecture: x64
Commit: 95017c711e
.NET SDKs installed:
10.0.401 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 10.0.12 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
None
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
VS Code version: 1.142.0
C# Extension version: 3.40.210
C# logs
C# output window contents:
See this page for collecting more detailed logs
Steps to reproduce
- Create a C# project structure where a file's physical directory layout does not match its declared namespace.
- Ensure you are using the new .slnx solution format (or a standard .sln) and the latest Preview channel version of the C# / C# Dev Kit extensions.
- Open the .cs file in the editor.
- Notice that the IDE0130 diagnostic warning ("Namespace does not match folder structure") successfully triggers and highlights the namespace declaration.
- Click on the lightbulb icon or press
Ctrl + .(Quick Fix / Quick Actions) on the highlighted namespace.
Expected behavior
The Quick Fix menu should contain the action "Change namespace to match folder structure" to automatically refactor and synchronize the namespace name based on the current directory path.
Actual behavior
The "Change namespace to match folder structure" code action is completely missing from the Quick Fix dropdown list. Only unrelated text style refactoring options (such as switching between block and file-scoped namespace styles - IDE0161) are available in the menu.
Additional context
This issue actual for preview version.
Release version.
- Lingua principale
- TypeScript
- Stelle
- 3.1k
- Fork
- 740
- Merge medio
- 1g 3h
- PR unite (30g)
- 52
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di dotnet/vscode-csharp
-
Remove temporary .NET 11 CI container digest pinForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. ApertaInfrastructure Test
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
dotnet/vscode-csharp#9791 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Error in project blazorApertaC#DK untriaged
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
dotnet/vscode-csharp#9911 ·
I maintainer di solito rispondono entro 1 giorno
-
reporteApertaC#DK untriaged
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
dotnet/vscode-csharp#9910 ·
I maintainer di solito rispondono entro 1 giorno
-
aApertaC#DK untriaged
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
dotnet/vscode-csharp#9901 ·
I maintainer di solito rispondono entro 1 giorno
-
Debugger untriaged
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
dotnet/vscode-csharp#9891 · 6 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di dotnet/vscode-csharp
Issue simili
-
[Bug]: Device screenshot fails with 500 on iPhone Duo (Xcode 27.2): serve-sim calls simctl without --displayForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
pingdotgg/t3code#24900 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
inu-appcenter/UNIDorm-web#411 ·
I maintainer di solito rispondono entro 1 giorno
-
🐛 bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
ranxianglei/billion-context#4720 ·
I maintainer di solito rispondono entro 1 giorno
-
area:arcade game p3-medium ready-for-agent type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
fderuiter/deruiter.dev#2840 ·
I maintainer di solito rispondono entro 1 giorno