Skip to content

Issues creating custom controls #3962

Closed

Description

@stefanolson

Current behavior

You receive a message "Fail to run wizard". See below for picture:
image

Also, when building the android version, you receive the following error:
CustomControl1.cs(16,25,16,39): error CS0260: Missing partial modifier on declaration of type 'CustomControl1'; another partial declaration of this type exists

Now this point I haven't created the themes folder, so I don't know if that's an issue. But it also happens when using the control in a cross-platform library (my real issue)

Expected behavior

Creates themes folder (doesn't actually exist) and xaml file and a generic.xaml if needed and should build under android.

How to reproduce it (as minimally and precisely as possible)

Create a new uno project. Right click on the Shared library, add, new item, Choose templated control, default name of CustomControl1.cs. Click add. Receive error.

Build, receive the other error.

Workaround

Manually create the themes folder and file for the first issue. Not sure about the second.

Environment

Nuget Package:

  • Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia
  • Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia
  • Uno.SourceGenerationTasks
  • Uno.UI.RemoteControl / Uno.WinUI.RemoteControl
  • Other:

Nuget Package Version(s):

Affected platform(s):

  • iOS
  • Android
  • WebAssembly
  • WebAssembly renderers for Xamarin.Forms
  • macOS
  • Skia
    • WPF
    • GTK (Linux)
  • Windows
  • Build tasks
  • Solution Templates

IDE:

  • Visual Studio 2017 (version: )
  • Visual Studio 2019 (version: 16.7.2 )
  • Visual Studio for Mac (version: )
  • Rider Windows (version: )
  • Rider macOS (version: )
  • Visual Studio Code (version: )

Relevant plugins:

  • Resharper (version: 2020.2 )

Anything else we need to know?

Activity

  1. added
    kind/bug
    triage/untriaged
    on Sep 4, 2020
  2. removed
    triage/untriaged
    on Sep 4, 2020
  3. jeromelaban commented on Sep 4, 2020

    @jeromelaban
    Member

    At this point, the only item template that is compatible without modifications with Uno is the Page template. It's available in the "Uno Platform" section when the Uno Platform VSIX is installed. The others are either Windows specific, or WPF specific.

    The partial error is also expected at this point, all controls built with Uno must have the partial qualifier for the source generator to work properly.

    We'll add those specifics to the documentation.

  4. added
    project/core-tools 🛠️
    on Sep 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugproject/core-tools 🛠️

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions