xamarin/Xamarin.Forms

[Bug] Hyphen/dash in project name breaks it

开放

#8,539 创建于 2019年11月17日

 (2 条评论) (0 个反应) (0 位负责人)C# (1,926 个派生)batch import
a/templatese/1 :clock1:good first issuehelp wantedinactivet/bug :bug:up-for-grabs

仓库指标

星标
 (5,644 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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

贡献者指南