uno.extensions icon indicating copy to clipboard operation
uno.extensions copied to clipboard

[Validation] UnoFeature for Validation is not available, manual Package import is needed

Open DevTKSS opened this issue 6 months ago • 2 comments

Current behavior

.UseValidation() is unknown in the hostbuilder even after adding it to the csproj file as UnoFeature?

Image Image

Expected behavior

Should be known at least after adding it as Uno Feature, to support Options Validation and similar like we are told to do in the docs

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

  1. Add the UnoFeature Validation (tryed with and without it)
  2. Add the .UseValidation() as described in your docs to the HostBuilder?

Environment

For bug reports Check one or more of the following options with "x" (Which options? here are no options listed in the Bug Report Template, sorry...)

Nuget Package (s):

Image Image

Package Version(s):

Tryed with Uno.Sdk 6.0.146 and 6.1.23 no change

Affected platform(s):

  • [x] Build tasks

Visual Studio:

  • [ ] 2019 (version: )
  • [x] 2022 (version: 17.14.10)
  • [ ] Visual Studio Code (version: )
  • [ ] Rider Windows (version: )
  • [ ] Rider macOS (version: )

Relevant plugins:

  • [ ] Resharper (version: )

Anything else we need to know?

Seen that Validation is also no Uno.Sdk known UnoFeatures Entry: https://github.com/unoplatform/uno/blob/3dfd3e3af936ec4636847a70815f406d5d65c6df/src/Uno.Sdk/UnoFeature.cs#L5-L118 which might be the reason that the Extension doc only tell us to add that UseValidation() but then we should defintly be able to use it as it is told to be able.

I did search in the hostbuilder src also if its maybe automatically already included like its the case for UseStorage() but thats not the case...

My Target was, to ensure the IOptions should be validated I load from appsettings and use the build in Validation Support from Uno...

DevTKSS avatar Aug 03 '25 10:08 DevTKSS