unoplatform / uno.templates

Uno Platform project templates
https://platform.uno/
Other
16 stars 11 forks source link

[Bug] xmlns:utum="using:Uno.Toolkit.UI.Material" namespace added by default even when Material is not used as a theme #726

Closed agneszitte closed 2 months ago

agneszitte commented 3 months ago

Current behavior

xmlns:utum="using:Uno.Toolkit.UI.Material" namespace added by default even when Material is not used as a theme.

Create an application using just -toolkit (without material theme)

For example, use this command to create a new project: dotnet new unoapp -preset blank -maui -toolkit -platforms "android" -platforms "ios" -o TestApp

Open the solution and notice the xmlns:utum="using:Uno.Toolkit.UI.Material" namespace in App.xaml.

Expected behavior

There should be no xmlns:utum="using:Uno.Toolkit.UI.Material" namespace in App.xaml if Material is not choose as a theme with the toolkit option.

Affected platforms

No response

Template Host

dotnet new, Visual Studio

Host OS

Windows

Template Options

dotnet new unoapp -preset blank -maui -toolkit -platforms "android" -platforms "ios" -o TestApp

Template Version

- Visual Studio Uno Platform Extension version: 5.2.50.62

- Uno.Templates:
   Package version: 5.3.0-dev.1873
   Reserved: True
   Details: Templates for creating Uno Platform apps and libraries
   Source Feed: https://api.nuget.org/v3/index.json
   Authors:
      Uno Platform
   Owners:
      https://nuget.org/profiles/unoplatform
   License Metadata:
      License: Apache-2.0
   License Expression: https://licenses.nuget.org/Apache-2.0
      License Url: https://www.nuget.org/packages/Uno.Templates/5.3.0-dev.1873/license
      Repository Url: https://github.com/unoplatform/uno.templates
   Templates:
      Template Name                     Short Name     Type      Tags                                                Language
      --------------------------------  -------------  --------  --------------------------------------------------  --------
      Uno Platform App                  unoapp         solution  Multi-platform/Uno Platform/Android/iOS/macOS/M...  C#

      Cross-Platform UI Tests Library   unoapp-uitest  project   Multi-platform/Uno Platform/UITest/Android/iOS/...  C#

      Multi-Platform App (.NET 8, UWP)  unoapp-uwp     solution  Multi-platform/Uno Platform/Android/iOS/Windows...  C#

      Cross-Platform Library            unolib         project   Multi-platform/Uno Platform/Library/Android/iOS...  C#

      Uno Maui Embedding Class Library  unomauilib     project   Multi-platform/Uno Platform/Android/iOS/Mac Cat...  C#

Anything else we need to know?

Related current condition: https://github.com/unoplatform/uno.templates/blob/1988c69088db532b51be80f4c829ab46777b2726/src/Uno.Templates/content/unoapp/.template.config/template.json#L2382

agneszitte commented 3 months ago

cc @jeromelaban, @dansiegel