xamarin/Xamarin.Forms

[Bug] Hyphen/dash in project name breaks it

Open

#8,539 opened on Nov 17, 2019

 (2 comments) (0 reactions) (0 assignees)C# (1,926 forks)batch import
a/templatese/1 :clock1:good first issuehelp wantedinactivet/bug :bug:up-for-grabs

Repository metrics

Stars
 (5,644 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Description

A project created from a template with an hyphen in its name will not build. After creating a blank project from scratch, the App class name can't be resolved, across namespaces that should be the same. It looks like the "-" is replaced by "_" during project creation in some occurrences but not all.

I would very much have "-" not supported at all with a clear error message.

Steps to Reproduce

  1. Create a new Xamarin Forms project, with a name containing an hyphen.
  2. Try to build.

Expected Behavior

Build successful, since the project is fresh and unchanged from the template.

Actual Behavior

Time wasted, because the error message doesn't point to the problem either.

Basic Information

  • Version with issue: 16.3.0.278
  • Last known good version: None. I had this same problem months ago and it caused me to drop my first hobby attempt with Xamarin.
  • IDE: VS Community 2019 16.3.8
  • Reproduction (project fresh from template -- just open and try to build): test-test.zip

Contributor guide