Skip to content

"." is treated as invalid character and is replaced with "_" #134

Closed
@taiyanzu

Description

@taiyanzu

To reproduce(Mac OS):

dotnet new lambda.EmptyFunction --name Company.Team.ProductA
cat Company.Team.ProductA/src/Company.Team.ProductA/Function.cs | grep namespace

Expected:

namespace Company.Team.ProductA

Actual:

namespace Company_Team_ProductA

In contrast, if you run

dotnet new console --name Company.Team.ProductB
cat Company.Team.ProductB/Program.cs | grep namespace

you get namespace Company.Team.ProductB as expected.

Another related error in Readme.md is that the directory names do not exist:

cd "Company_Team_ProductA"
cd "Company_Team_ProductA/test/Company_Team_ProductA.Tests"
cd "Company_Team_ProductA/src/Company_Team_ProductA"

They should be:

cd "Company.Team.ProductA"
cd "Company.Team.ProductA/test/Company.Team.ProductA.Tests"
cd "Company.Team.ProductA/src/Company.Team.ProductA"

It seems invalid characters are replace with "_". But according to vs_projectname "." is valid.

Because "." is heavily used in .NET projects to organize code, it should not be escaped with "_".

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions