dotnet / dotnet/vscode-csharp

Root namespace with dots breaks namespace sync

Open
#5,212 4 comments 1 reaction 0 assignees View on GitHub
OmniSharp
Dominant language
TypeScript
Stars
3.1k
Forks
737
Avg merge
17h 56m
Merged PRs (30d)
21

Description

## Issue Description ##

I am trying to use https://github.com/OmniSharp/omnisharp-roslyn/pull/1563 to sync namespace after moving source file. It works for project named Foo but not in project Foo.Bar.

## Steps to Reproduce ##

Position cursor at Baz in the project shown below and press Ctrl+.

![Screenshot from 2022-05-14 00-29-47](https://user-images.githubusercontent.com/3514517/168397196-53927ca9-fd77-470f-b4fc-44c4baa18427.png)

## Expected Behavior ##

Option to change namespace to 'Foo.Bar.Bah'.

## Actual Behavior ##

No code action available.

## Environment information ##

**VSCode version**: 1.67.1
**C# Extension**: 1.24.4

Mono Information
OmniSharp using built-in mono
Dotnet Information
.NET SDK (reflecting any global.json):
Version: 5.0.206
Commit: 0cf287db1b

Runtime Environment:
OS Name: fedora
OS Version: 35
OS Platform: Linux
RID: fedora.35-x64
Base Path: /usr/lib64/dotnet/sdk/5.0.206/

Host (useful for support):
Version: 5.0.9
Commit: 208e377a53

.NET SDKs installed:
3.1.418 [/usr/lib64/dotnet/sdk]
5.0.206 [/usr/lib64/dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.24 [/usr/lib64/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.9 [/usr/lib64/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.24 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.9 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download

Visual Studio Code Extensions

|Extension|Author|Version|
|---|---|---|
|csharp|ms-dotnettools|1.24.4|
|dotnet|formulahendry|0.0.4|
|dotnet-test-explorer|formulahendry|0.7.7|;

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.