Skip to content

Error in solution when setting --output and using dashes #2227

@ferarias

Description

@ferarias

Describe the bug

When using only --output and using dashes in the name, the project references are wrongly generated with underscores in the solution file.

Steps to reproduce

  1. dotnet new install Boxed.Templates
  2. dotnet new api --output boxed-poc-myapi --title "Boxed POC Api" --param:author "John Doe" --contact "[email protected]" --description "This is a test Web API built from a template"
  3. dotnet build .\boxed-poc-myapi\
    Returns
    C:\Program Files\dotnet\sdk\9.0.305\NuGet.targets(509,5): error MSB3202: The project file "D:\src\boxed-poc-myapi\Source\boxed_poc_myapi\boxed_poc_myapi.csproj" was not found.
    C:\Program Files\dotnet\sdk\9.0.305\NuGet.targets(509,5): error MSB3202: The project file "D:\src\boxed-poc-myapi\Tests\boxed_poc_myapi.IntegrationTest\boxed_poc_myapi.IntegrationTest.csproj" was not found

Expected behaviour

Success build

Template

API

.NET Boxed Version

Latest

Visual Studio Version

Visual Studio 2022 Latest

.NET Version

9.0.305

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssues describing a bug or pull requests fixing a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions