Repository navigation
Description
Current behavior 🐛
As soon as my uno app contain the net9.0-windows10.0.26100 and I try to use for the Desktop Target for example the Uno.AutenticationBroker.IWebAuthenticationBrokerProvider via ApiExtension like described in the Uno docs I am getting red not just green lintings of the compiler in my IDE introducing me, that this type is not known and I would maybe miss some Namespace using import or package reference.
hovering over that linting told me that this is "just" not supported on Windows, so it made no sense to lint red as my editor is set to desktop or you can choose even any other non windows including target like:
- android
- ios
- desktop
which I tryed. None of them were resolving that linting.
Expected behavior 🎯
- only green lint, not red -> error
- not lint at all would be even more perfect
- net9.0 should not be a problem as the workaround does exclude test projects to be used
How to reproduce it (as minimally and precisely as possible) 🔬
-
create a new uno app including the Authentication + DI UnoFeature to have some
.ConfigureServices( -
copy over that code from the linked issue into another Library Project (the Implementing extended type will otherwhise give you the information that its not known independant on the fact that its maybe included in your project and you may do have the correct using namespace in place)
Use for example this csproj setup for the library:<Project Sdk="Uno.Sdk"> <PropertyGroup> <TargetFrameworks>net9.0-desktop;net9.0;net9.0-android;net9.0-ios;net9.0-browserwasm</TargetFrameworks> <!-- optionally include the windows target, but as we are not told that this is required and should be specific to desktop target where its not supported I did not include it here --> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> <OutputType>Library</OutputType> <GenerateLibraryLayout>true</GenerateLibraryLayout> <UnoFeatures> Hosting; SkiaRenderer; Logging; </UnoFeatures> </PropertyGroup> <ItemGroup> <PackageReference Include="Yllibed.HttpServer" /> </ItemGroup> </Project>
-
used PackageVersion in Directory.Packages.props:
<PackageVersion Include="Yllibed.HttpServer" Version="1.0.0-dev.11" /> -
make sure you add the namespace using of your created Library Project above the attribute for api extension otherwise it will not recognize your Implementing class at all.
-
Recognize by the way, that this TargetFrameworks will not recognize the sample used
HAS_UNO_SKIAand tells you that you will get build -
go back to your normal UI Project and add the appropriate ProjectReference now to your Library and add the using of your Project Namespace and the Uno.AuthenticationBroker ( I even added the IWebAuthenticationBrokerProvider using as alias to get rid of that problem)
-
add it to your
ConfigureServicesin DI and recognize this happening:
-
At this step I have this setup in my regular project:
recognize the Windows commented out at this time, you can try to include it and removing the conditions it will just not longer find the Uno type additionally. 🫤 the net9.0 seems to be required as I included UITest and Unit Test to my solution at template creation, which is beneath Windows not finding that type (?)
Workaround 🛠️
to get rid of that not-build allowing thing in cost of not longer be able to include the test projects like we get it as default setup, now comment out after following the repro steps also the net9.0 (drag it also out of TargetFrameworks, otherwise the IDE will argue ;) )
Congratulations! We not longer having this error showing up and the IDE is fine with it! Well, and your test projects are not longer happy with the TargetFrameworks of the UI Project.

Renderer 🎨
- Skia
- Native
Affected platforms 📱💻🖥️
No response
Uno.Sdk version (and other relevant versions) 📦
6.0.146
tryed with the 6.1.23 version also,but that results in Uno0001 warning additionally?
IDE version 🧑💻
VS2022 17.14.11
Anything else we need to know? 💬
as from - unoplatform/uno.extensions#2640 the WebAuthenticationBroker is not supported on desktop which makes it with the current situation impossible to use WebAuth.
So to surround that problem, I copied that suggested code from the linked issue and tryed out if it would help my get a Browser to open for grant access of my user.
Not sure why that gets red linted, but maybe someone known with the uno used constants of that Feature, could have a look on it and make it just green lint somehow as it should not cause problems on non windows targets at all?
Activity
DevTKSS commentedon Aug 12, 2025
Additional information to the mentioned test project related errors I not nearer described:
That is happening or coming up as soon as this test project is the nunit unit test project we get from the templated app for example. xunit and uiTest is fine from what I seen yesterday, to not have the net9.0 target in our main app.
DevTKSS commentedon Oct 31, 2025
Found an issue that seems to speak of very similar behavior with the constants:
__SKIA__constant is not defined in a library when targetingnet9.0-desktop#18996@MartinZikmund not sure if this then adds more information or should be marked as duplicate... But the thing with constants seems to be not fixed so far😅
github-actions commentedon May 15, 2026
This issue has had no activity for 120 days. It will be closed in 10 days if there is no further activity. Remove the Stale label or leave a comment to keep it open.
MartinZikmund commentedon May 18, 2026
Thanks for the detailed write-up @DevTKSS, and apologies for the slow response. The root cause here is that the Uno.AuthenticationBroker namespace (including IWebAuthenticationBrokerProvider) is part of Uno.UWP, which is not compiled for the net9.0-windows10.0.x target — on Windows you're expected to use the native Windows.Security.Authentication.Web.WebAuthenticationBroker directly, so the Uno extensibility hook isn't present there. That's why a #if !WINDOWS guard around the [assembly: ApiExtension(...)] and the implementing class is the correct approach when your library multi-targets Windows alongside the Uno targets. The broader constants/library-target inconsistency you ran into is being tracked in #18996, so I'll close this one as a duplicate of that. If you think we should also adjust the Web Authentication Broker docs to call out the #if !WINDOWS requirement explicitly, please open a small docs issue and I'll happily take it.