Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
taiyanzu opened this issue Jul 5, 2017 · 2 comments
Closed

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

taiyanzu opened this issue Jul 5, 2017 · 2 comments
Labels
bug This issue is a bug.

Comments

@taiyanzu
Copy link

taiyanzu commented Jul 5, 2017

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 "_".

@normj normj added the bug This issue is a bug. label Jul 6, 2017
@normj
Copy link
Member

normj commented Aug 15, 2017

I opened up the dotnet/templating#1193 issue on the dotnet/templating repository to find a fix for this issue but it doesn't look like there is a fix you in the templating engine. Sounds like a fix is coming, or probably came out yesterday as part of the .NET Core 2.0 release. But if I make that change then users with the pre .NET Core 2.0 cli will be even more broken.

@normj
Copy link
Member

normj commented May 1, 2018

Version 3.0.0 of Amazon.Lambda.Templates released today now has this fixed.

@normj normj closed this as completed May 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants