IntelliSense Not Showing Resources from Custom Control Library in WinUI

Mahdi Hosseini 250 Reputation points
2025-12-09T14:10:37.2566667+00:00

I have a custom control library called DevWinUI. I noticed that when I install it as a NuGet package and reference its Generic.xaml file in App.xaml, the resources do not appear in IntelliSense.

The app works fine at runtime, but IntelliSense does not show the resources. I tried creating a blank library and a blank app, and in that case, IntelliSense works correctly. I’m not sure why IntelliSense is not working for my library.

this is how i refrence Generic.xaml file:

<ResourceDictionary Source="ms-appx:///DevWinUI.Controls/Themes/Generic.xaml" />

also here you can fine my nuget package:

https://www.nuget.org/packages/DevWinUI.Controls

i get this:

User's image

but it should be this:

User's image

I tested using both StaticResource and ThemeResource, but neither works.

For testing, you can either:

Install the DevWinUI.Controls NuGet package, reference the Generic.xaml file in App.xaml, and try setting a Style for Grid.

Windows development | WinUI
0 comments No comments
{count} votes

Answer accepted by question author
  1. Raymond Huynh (WICLOUD CORPORATION) 3,955 Reputation points Microsoft External Staff Moderator
    2025-12-10T10:58:46.48+00:00

    Hello Mahdi Hosseini,

     

    Thanks for taking the time to investigate this.

    I tested this many times in many way but got the same result as you.
    User's image

    At this point, the best next step would be to raise this through the Visual Studio feedback channels, so it can be reviewed by the XAML designer and IntelliSense owners. That’s the team responsible for design-time resource discovery.

    You can submit this via the Visual Studio Developer Community portal: https://developercommunity.visualstudio.com

    When submitting, it will help to include:

    • A minimal repro (app + custom control library → packed as NuGet)
    • Confirmation that the resources work correctly at runtime
    • The fact that IntelliSense resolves the resources when using a project reference but not when using the NuGet package

    That information will allow the tooling team to evaluate whether additional design-time support is needed for this scenario.

    As a temporary workaround during development, keeping the control library as a project reference (instead of NuGet) is the most reliable way to retain IntelliSense support.

    Hope this helps, and thanks for surfacing the issue, feedback like this is valuable for improving the tooling experience.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.