You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But it actually returns the full namespace to the current code file.
Example:
from my cs proj file: <RootNamespace>SampleApplication</RootNamespace>
My Item Template Code: using $rootnamespace$.Validators
When I use this item template to produce the new class in my SampleApplication.Commands folder, it SHOULD produce using SampleApplication.Validators;
instead it produces using SampleApplication.Commands.Validators;
This makes it impossible to write templates that reference any code outside the item's own namespace, and is inconsistent with the official documentation.
rootnamespace
The root namespace of the current project. This parameter applies only to item templates.
using Visual Studio 2022
The text was updated successfully, but these errors were encountered:
According to the documentation https://docs.microsoft.com/en-us/visualstudio/ide/template-parameters?view=vs-2022
the rootnamespace parameter should return the root namespace of the current project.
But it actually returns the full namespace to the current code file.
Example:
from my cs proj file:
<RootNamespace>SampleApplication</RootNamespace>
My Item Template Code:
using $rootnamespace$.Validators
When I use this item template to produce the new class in my SampleApplication.Commands folder, it SHOULD produce
using SampleApplication.Validators;
instead it produces
using SampleApplication.Commands.Validators;
This makes it impossible to write templates that reference any code outside the item's own namespace, and is inconsistent with the official documentation.
using Visual Studio 2022
The text was updated successfully, but these errors were encountered: