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

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

Open
dannythunder opened this issue Jun 8, 2021 · 7 comments
Open

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

dannythunder opened this issue Jun 8, 2021 · 7 comments

Comments

@dannythunder
Copy link

dannythunder commented Jun 8, 2021

  • .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

@ardalis
Copy link
Owner

ardalis commented Oct 8, 2021

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
Copy link
Owner

ardalis commented Nov 6, 2021

Documented in README.

@kemmis
Copy link

kemmis commented Nov 26, 2022

+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.

@ardalis
Copy link
Owner

ardalis commented Nov 26, 2022

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

@Gonkers
Copy link

Gonkers commented Nov 18, 2023

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

@sadukie
Copy link
Contributor

sadukie commented Jan 22, 2024

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

See also: this issue in dotnet templating

@ardalis ardalis reopened this Nov 12, 2024
@ardalis
Copy link
Owner

ardalis commented Nov 12, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants