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

Wrong namespace is generated when project name contains invalid namespace chars #5065

Closed
filzrev opened this issue Feb 18, 2025 · 1 comment · Fixed by #5068
Closed

Wrong namespace is generated when project name contains invalid namespace chars #5065

filzrev opened this issue Feb 18, 2025 · 1 comment · Fixed by #5068

Comments

@filzrev
Copy link

filzrev commented Feb 18, 2025

Describe the bug

When project name contains invalid namespace chars.
Microsoft.Testing.Platform.MSBuild package generating TestingPlatformEntryPoint.cs with invalid namespace.

Image

Steps To Reproduce

  1. Create New Folder (1) directory.
  2. Install TUnit project template with following command

    dotnet new install TUnit.Templates

  3. Create test project with following command
    dotnet new TUnit
    dotnet add package TUnit
    dotnet add package Microsoft.Testing.Platform.MSBuild
    
  4. Run dotnet build and confirm errors

Expected behavior

Escaped namespace (New_Folder__1_) is generated.

Actual behavior

( char is not escaped.

Additional context

This problems happens when using MTP v1.6.0 or later.

I also confirmed same behavior when using xUnit.v3.

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

Successfully merging a pull request may close this issue.

2 participants