4.5 Live Template Imports Incorrect Namespace

I have the following live template:

    public abstract class $SPECNAME$ : $Specification$

where the $NAMESPACE$ is mapped to "Default Namespace for current file".

When creating a file based on the template in an empty folder, it works fine.
Whe creating a file in a folder with a single file in the folder, it imports the name of the existing file as the namespace of the new file.

For example, inside folder "Test"
There is one file called MyTest.cs with namespace Test.
When creating new file called Test2.cs the namesapce is Test.MyTest

If there are two or more files in the folder it works fine.

I have tried changing the macro to "Default Namespace for current project" and it works, but of course does not include the namespacing of the folders.

Has anyone else experienced this behavior?

I have attached some images showing this in visual studo.

I am using 4.5.1274.1

Is there a way to prevent this, it is becoming extremly frustruating.



Please sign in to leave a comment.