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.

Set root namespace of a project

See original GitHub issue

From @ruimaciel on November 13, 2018 11:43

When using VS Code 1.28.2 to work on C# projects, apparently the default root namespace adopted by a project is deduced from the project tree structure. However, some projects happen to have root namespaces that don’t match the projec tree. It would be nice if VS Code enabled developers to specify the root namespace of a project.

Some online comments mention the existence of an option labelled RootNamespace supported by csproj files. However, the contents of that variable have no effect on VS code commands such as “new C# class”.

It would be very helpful if VS Code offered a way to configure the root namespace of a project, or even the default namespace used in specific folders of a project. Supporting third-party data sources such as the contents of csproj files would be ideal, but being able to specify this sort of option in the contents of .vscode would work as well.

Copied from original issue: Microsoft/vscode#63018

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:24
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
CrossBoundcommented, Oct 15, 2019

upvote… I would love to have this feature

3reactions
KreativJoscommented, Jul 3, 2020

This has been resolved in the ‘C# extensions’ extension. I still think these commands should be included in the omnisharp-vscode extension.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change Project Namespace in Visual Studio - Stack Overflow
Default namespace is the namespace that Visual studio sets when you create a new class. Next time you do Right Click > Add...
Read more >
change project and root namespace name - MSDN - Microsoft
i am trying to change the project name and root namespace but the namespace field is disabled. Does someone know how to change...
Read more >
How can I change the root namespace for scripts in Unity?
The root namespace is a Unity setting that is applied to each new script created. I tested it now, I renamed my current...
Read more >
Adjust Namespaces | JetBrains Rider Documentation
Synchronize namespaces with project structure · In the Solution Explorer, select a node where you want to synchronize namespaces. · Do one of...
Read more >
namespace - Premake
Sets the root namespace of a project. ... By default, the root namespace for a project which match the target (assembly) name. This...
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