xamarin/Xamarin.Forms

[Bug] Hyphen/dash in project name breaks it

Aperta

#8539 aperta il 17 nov 2019

 (2 commenti) (0 reazioni) (0 assegnatari)C# (1926 fork)batch import
a/templatese/1 :clock1:good first issuehelp wantedinactivet/bug :bug:up-for-grabs

Metriche repository

Star
 (5644 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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

Guida contributor