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

Creating Blazor ASPNET core app with hyphen in name fails #16399

Closed
conficient opened this issue Mar 19, 2018 · 2 comments
Closed

Creating Blazor ASPNET core app with hyphen in name fails #16399

conficient opened this issue Mar 19, 2018 · 2 comments
Assignees
Labels
area-blazor Includes: Blazor, Razor Components

Comments

@conficient
Copy link
Contributor

  • VS version: 15.7.0 Preview 1.0
  • Blazor VSIX: 15.6.10106

Steps to reproduce:

  1. Create new "ASP.NET Core Web Application"
  2. In Name enter a name with a hyphen, e.g. Blazor-20180319
  3. Select Blazor (ASP.NET Core hosted)
  4. Attempt to build solution

Result:

Build fails with errors due to only some names being converted to underscore and not others.

The type or namespace name 'Shared' does not exist in the namespace 'Blazor_20180319' (are you missing an assembly reference?)

Expected result:

Build should work

Notes:

The .Server project has references to folder and project names where hyphens are converted to underscores, e.g.

    <ProjectReference Include="..\Blazor_20180319.Client\Blazor_20180319.Client.csproj" />
    <ProjectReference Include="..\Blazor_20180319.Shared\Blazor_20180319.Shared.csproj" />

However the actual folders and projects are created with the hyphen, e.g /Blazor-20180319.Client/

Workaround

Don't use project or solution names with hyphens :)

@SteveSandersonMS
Copy link
Member

Thanks for letting us know!

@conficient
Copy link
Contributor Author

Tried to look at this, it might be an issue with dotnet templating - see dotnet/templating aspnet/AspNetCore#16301 and dotnet/templating aspnet/AspNetCore#16199

@danroth27 danroth27 self-assigned this Apr 26, 2018
SteveSandersonMS referenced this issue in SteveSandersonMS/BlazorMigration Nov 27, 2018
@mkArtakMSFT mkArtakMSFT transferred this issue from dotnet/blazor Oct 27, 2019
@mkArtakMSFT mkArtakMSFT added the area-blazor Includes: Blazor, Razor Components label Oct 27, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Dec 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

No branches or pull requests

4 participants