question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VB -> C#: Duplicate Namespace

See original GitHub issue

Please prefix the issue title with either "C# -> VB: " or "VB -> C#: " if relevant

Input code

Namespace Child

Erroneous output

namespace Root.Namespace.Root.Namespace.Child

Expected output

namespace Root.Namespace.Child

Details

Product in use: VS extension

Version in use: 6.1

The project is a class library with a root namespace project property set. At the example above it would be Root.Namespace . I am not sure why the second root namespace appears.

It is an easy work around on the produced code to replace the duplicates, just reporting in case something more serious is hidden.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
knodel12commented, Nov 16, 2018

@GrahamTheCoder Wondering why you removed the RootNamespace logic. It seems that all VB files that previously had no namespace now get created in C# without a namespace, regardless of the project root namespace. Is this intentional?

0reactions
GrahamTheCodercommented, Aug 29, 2019

Fixed in 2483369355807050379e2385a4f22d16eb3437f7

Read more comments on GitHub >

github_iconTop Results From Across the Web

Duplicated Namespace is created on dll - vb.net
I'm creating a class library in VS2019 (VB.NET). In the project properties, I used this root namespace: Customer.App.Classlibrary. When I'm ...
Read more >
Duplicate root namespace in settings file with sdk-style ...
When using an SDK-style project and vb.net, the automated tool generates a duplicate root namespace for settings files. Steps to Reproduce:.
Read more >
Namespaces - Visual Basic
Namespaces organize the objects defined in an assembly. Assemblies can contain multiple namespaces, which can in turn contain other namespaces.
Read more >
Duplicate namespace when saving a Database First EDMX ...
In VS2017 add a new ADO.Net Entity Data Model to an existing VB.Net project. When wizard launches choose EF Designer from database.
Read more >
Multiple classes with the same name, but different ...
I've run into some code (C# if it matters) that has classes which have the same name, but differ in their namespaces.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found