You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Renaming the namespace of a file does not update using namespaces on other scripts that reference it.
Steps to Reproduce
Create a script called Model.cs and have it in the namespace Sample.Controller. Create another script called Controller.cs and have it in the namespace Sample.Controller too.
Create any arbitrary method in Model.cs and have Controller.cs use it to establish a reference.
Move Model.cs to a new namespace Sample.Model through the F2 rename function.
Expected Behavior
Controller.cs should have a reference to Model.cs namespace in its using statements.
Actual Behavior
Controller.cs does not update its using statements.
Environment information
VSCode version: 1.87.2 C# Extension: 2.23.2 Using OmniSharp: false
Type: Bug
Issue Description
Renaming the namespace of a file does not update
using
namespaces on other scripts that reference it.Steps to Reproduce
Sample.Controller
. Create another script called Controller.cs and have it in the namespaceSample.Controller
too.Sample.Model
through the F2 rename function.Expected Behavior
Controller.cs should have a reference to Model.cs namespace in its
using
statements.Actual Behavior
Controller.cs does not update its using statements.
Environment information
VSCode version: 1.87.2
C# Extension: 2.23.2
Using OmniSharp: false
Dotnet Information
.NET SDK: Version: 8.0.202 Commit: 25674bb2f4 Workload version: 8.0.200-manifests.8cf8de6dRuntime Environment:
OS Name: Windows
OS Version: 10.0.22631
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.202\
.NET workloads installed:
There are no installed workloads to display.
Host:
Version: 8.0.3
Architecture: x64
Commit: 9f4b1f5d66
.NET SDKs installed:
8.0.103 [C:\Program Files\dotnet\sdk]
8.0.202 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.28 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.28 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
Visual Studio Code Extensions
Extension version: 2.23.2
VS Code version: Code 1.87.2 (863d2581ecda6849923a2118d93a088b0745d9d6, 2024-03-08T15:20:17.278Z)
OS version: Windows_NT x64 10.0.22631
Modes:
System Info
The text was updated successfully, but these errors were encountered: