Skip to content
This repository was archived by the owner on Apr 27, 2026. It is now read-only.
This repository was archived by the owner on Apr 27, 2026. It is now read-only.

[BUG] Extra dot is added when creating a library in a custom directory #60

@bcallaghan-et

Description

@bcallaghan-et

Describe the bug
When generating a new library with the --directory flag, an extra dot is added to the project's name. This also applies to the corresponding test project.

To Reproduce
Steps to reproduce the behavior:

  1. In a new Nx workspace, run the following command
nx generate @nx-dotnet/core:lib --name=my-lib --language=C# --template=classlib --testTemplate=xunit --directory=my-folder
  1. Open the newly generated folder libs/my-folder/my-lib.
  2. See that the name of the .csproj file is MyFolder..MyLib.csproj.

Expected behavior
The project's name should be MyFolder.MyLib.csproj with only one dot between the folder and project names.

Screenshots
The following screenshot shows a real-world example of this bug, using Nx Console to run the lib generator.
image

Environment:

  • OS: Windows
  • Browser: N/A
  • Version: 0.10.3
  • Affected Packages: @nx-dotnet/core

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageThis issue has yet to be looked over by a core team memberoutdated

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions