unoplatform / uno.templates

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

[Bug] Missing Extensions Options in UnoFeatures starting from Blank Preset when creating projects with Uno Templates, VS Wizard, or Live Wizard #991

Open agneszitte opened 3 hours ago

agneszitte commented 3 hours ago

Description:

I'm encountering an issue with the latest Uno templates (v5.4.5) and the latest VS Uno Extension (v5.4.11) with Wizard when attempting to add various extensions options to a blank preset project. The issue affects not just Localization, but other extension options such as HTTP as well, which do not get properly reflected in the <UnoFeatures /> in the .csproj of the project. Below are the details with the Localization option as an example :

Steps to Reproduce:

Using Visual Studio Wizard:

  1. Select a Blank Preset project.
  2. Enable Dependency Injection (DI) and Localization.
  3. Create the project.
  4. Observed Behavior: The corresponding entry Localization is missing from UnoFeatures in the .csproj file of the project.

    https://github.com/user-attachments/assets/edeb1c4f-8c38-48f7-bafc-7286dbe297f4

Using Live Wizard:

  1. Select a Blank Preset project.
  2. Enable Dependency Injection (DI) and Localization.
  3. At the end, notice that option -loc is missing from the generated command.
  4. Copy and paste the command to manually create the project.
  5. Observed Behavior: Obviously, no corresponding entry Localization in UnoFeatures in the .csproj file of the project.

    https://github.com/user-attachments/assets/0070cbc4-e649-40ce-973f-7767eee95ecf

Using CLI:

  1. Use the blank preset command (dotnet new unoapp -preset=blank -o test) and manually add -di and the localization option -loc.
  2. Observed Behavior: The corresponding entry Localization is missing from UnoFeatures in the .csproj file of the project.

    https://github.com/user-attachments/assets/db245fcd-b6af-4dae-9dc4-2ff87acff9e7

Additional Observations:

https://github.com/user-attachments/assets/a9e3dbed-c033-40e8-a0c2-ce64a4338fe4

Expected Behavior:

In all cases, when selecting additional extensions such as Localization, Configuration, or HTTP, these options should be properly reflected in the UnoFeatures of the .csproj file and the generated command (for Live Wizard).

agneszitte commented 3 hours ago

cc @jhanvi03, @Darsh0307

agneszitte commented 1 hour ago

Are we missing any additional tests?

From @jeromelaban:

If we do not have such validations in the uno.templates generation, we need to add some more.