httpflow icon indicating copy to clipboard operation
httpflow copied to clipboard

Solution can't load if hypen is used in the name

Open dannythunder opened this issue 4 years ago • 8 comments

  • .NET SDK Version: net6

Template version: Latest of todays date (8 June 2021)

Steps to Reproduce:

  1. Install template via terminal/cmd
  2. Create new project with hyphen ( - ) i.e. my-service

Project fails to load due to some naming in the .sln gets named my_service (underscore instead of hyphen)

edit: found that this is reported as a bug (and it's been a while): Dash - in sourceName gets changed to underscore _ inside files but not in file names

dannythunder avatar Jun 08 '21 11:06 dannythunder

That's unfortunate, but doesn't sound like anything in my control. Probably best to document it in the README. I'll take care of it soon.

ardalis avatar Oct 08 '21 03:10 ardalis

Documented in README.

ardalis avatar Nov 06 '21 00:11 ardalis

+1 I ran into this issue today. Took me a few minutes scratching my head to figure out why none of the projects in my solution were loading correctly. Maybe see if you can merge that PR from a year ago. Hyphens are ubiquitous in file/project naming.

kemmis avatar Nov 26 '22 12:11 kemmis

I think I ran into this whole streaming recently, too. Will prioritize it.

ardalis avatar Nov 26 '22 13:11 ardalis

I realize this is a closed issue, but I wanted to add more detail for googs and bings

  • .NET SDK Version: 8.0

Steps to Reproduce:

  1. run dotnet new install Ardalis.CleanArchitecture.Template::9.0.0-preview2
  2. run dotnet new clean-arch -n clean-arch
  3. run start .\clean-arch2\clean-arch2.sln

The project paths in the sln file are generated with underscores, but the path on disk has hyphens.

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31815.197
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{106AE906-5075-410A-B941-912F811848EE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{B31B4797-1D9F-4288-808C-BE9A31A98C7D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "clean_arch2.Web", "src\clean_arch2.Web\clean_arch2.Web.csproj", "{C9751CB7-4CD6-4633-A99A-4F6ADD525437}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "clean_arch2.Core", "src\clean_arch2.Core\clean_arch2.Core.csproj", "{4548EB20-1D1B-477B-AF6E-DD55653A6583}"
EndProject

Gonkers avatar Nov 18 '23 06:11 Gonkers

Noted that the README still links to this issue. Also seeing Gonkers comment above.

See also: this issue in dotnet templating

sadukie avatar Jan 22 '24 19:01 sadukie

This is still an issue. Just repro'd @Gonkers behavior in the latest version (10.0.0) on Win11. Folders end up with hyphens in them but the solution file replaces hyphens with underscores.

ardalis avatar Nov 12 '24 22:11 ardalis