dotnet / aspire

An opinionated, cloud ready stack for building observable, production ready, distributed applications in .NET
https://learn.microsoft.com/dotnet/aspire
MIT License
2.98k stars 280 forks source link

Generated test template does not sanitize project name for use as namespace #3957

Closed radical closed 2 weeks ago

radical commented 2 weeks ago

For example, here - is being used as is. dotnet new aspire-starter -t xunit.net --use-redis-cache -o asp-starter-with-redis-with-xunit0

asp-starter-with-redis-with-xunit0.Tests/WebTests.cs:

namespace asp-starter-with-redis-with-xunit0.Tests;

It is correctly changed for other projects: asp-starter-with-redis-with-xunit0.Web/WeatherApiClient.cs:

namespace asp_starter_with_redis_with_xunit0.Web;

cc @ReubenBond @joperezr @DamianEdwards