How to make Visual Studio 2017 + VB.NET create new classes already with the namespace, as it does in C #?
I've tried creating and editing item templates using the $itemfolder$
parameter, but it does not seem to work:
Template
Namespace $itemfolder$
Public Class $safeitemrootname$
End Class
End Namespace
Output
Namespace $itemfolder$
Public Class MyClass2
End Class
End Namespace
Already using the $rootnamespace$
parameter, it does not work as it should:
Template
Namespace $itemfolder$
Public Class $safeitemrootname$
End Class
End Namespace
Output
Namespace ConsoleApp1
Public Class MyClass
End Class
End Namespace
Solution Explorer
I was expecting the namespace to be ConsoleApp1.TestNamespace
or TestNamespace
.
Is there a way to make VS2017 automatically add namespaces to new VB.NET classes?
I know Resharper works, but it gets paid.