Rider / .asmDef / NameSpace

Hello,

While developing packages with Rider IDE, I noticed that there is no option to specify a root namespace for the package.

So the IDE constantly reminds me: “Namespace does not corrospond to file location, should be: Packages.TLD.DOMAIN.PROJECT” whereas my root folder is like “TLD.DOMAIN.PROJECT”.

It would be great if we could specify a default root namespace in .asmdef files like “TLD.DOMAIN” and then IDE knows thats how I want it.

I am unsure if similiar issue exists in Visual Studio.

Thanks for reading.

2 Likes

If you have suggestions for Unity integration improvements for Rider, you have to tell RIder, not Unity. They read and handle feature requests on the integration’s Github page, here.

Allright thank you!

Is there anyway you guys could collobrate with intellij/rider team?
It would be cool if there would be a way to specify the namespace in asmdef, but this file is unity standard so I think it would depend on unity team if they ever would want to add such a property?

After I opened a github issue here: .asmdef / root namespace · Issue #1584 · JetBrains/resharper-unity · GitHub

there seems some additional discussion here:https://youtrack.jetbrains.com/issue/RIDER-36546

And the latest statement points out that it would be more easy if we have a rootnamespace-proeprty inside asmdef, that could be optional.

"Theoretically it could have been comfortable to set custom rootnamespace in the asmdef. But it is something Unity team can do, not us."

It would be very cool if you guys could somehow get in touch and solve this as it would benefit both sides.
Thanks alot!

1 Like

This is now supported, see the GitHub issue linked by Nothilvien above.

1 Like