How do I get ride of the namespace template when I create new C# classes?
Answered
Every class I create has a default namespace added to it. I want my C# classes to only have "public class ClassName{}" and that is it. I have looked into the File and Code Templates setting, but I am not understanding if that is the right place to be or not.
Please sign in to leave a comment.
Hello,
Generally, this is not possible yet, please vote for the corresponding issue on YouTrack.
But there is a workaround if you use ReSharper:
1. Configure C# Class File template in ReSharper -> Tools -> Template Explorer
2. Save it
3. Copy-paste a string from ReSharper settings file to Rider settings file
ReSharper's is in "%AppData%\JetBrains\Shared\vAny\GlobalSettingsStorage.DotSettings"
Rider's is in "%HomePath%\.Rider2017.3\config\resharper-host\GlobalSettingsStorage.DotSettings"
The string will start with:
The YouTrack issue has been solved and it works now! Huge upgrade to my workflow. Thanks Julia!