When we are trying to open the dataset .xsd file which is located in app code it gives attached error . the solution is in asp.net web forms version 4.o

rajbeer negi 0 Reputation points
2026-08-14T10:33:04.4966667+00:00

User's image

When i am trying to open the dataset .xsd file which is located in app code it gives attached error . the solution is in asp.net web forms version 4.o. please give the solution for the error shot

Developer technologies | Visual Studio | Debugging
0 comments No comments

1 answer

Sort by: Most helpful
  1. Jay Pham (WICLOUD CORPORATION) 4,270 Reputation points Microsoft External Staff Moderator
    2026-08-17T01:12:37.94+00:00

    Hi @rajbeer negi ,

    Looking at your code, I think both problems you are seeing come from the same place, the resource PRI.

    In TrayMenuFlyout, the constructor loads a style from ms-appx:///ShimizuToolkit.TrayIconWinUI/Themes/TrayMenuFlyoutPresenterStyle.xaml. When the app runs unpackaged (which is what happens by default when you F5 in Visual Studio), that URI is resolved from files on disk, so it works. Once the app runs as a packaged MSIX, every ms-appx:/// lookup has to go through the package resources.pri. If your class library resources are not merged into the app PRI, that lookup throws, RightTrayMenu never gets constructed, and the right click menu simply never appears. Left click still works because TrayWindow is built entirely in code and does not touch any resource dictionary.

    Your build error backs this up. GenerateProjectPriFile is exactly the MSBuild task that produces resources.pri, so the resource pipeline in your project is currently broken.

    To confirm, wrap the flyout setup in a try/catch and log the exception. Since SetUpTrayIcon is async void, any exception there is swallowed silently and you never see it.

    Workaround you can apply right away: stop depending on the ms-appx resource inside the library. Either define the MenuFlyoutPresenterStyle directly in code, or build it with XamlReader.Load from an inline XAML string, or move that theme file into your main app and merge it in App.xaml. Any of these avoids cross project resource resolution in a packaged context.

    For the build error itself, check that your main project has <EnableMsixTooling>true</EnableMsixTooling> and <UseWinUI>true</UseWinUI>, delete bin, obj and .vs, then do a clean rebuild. If it still shows up, set <ProjectPriIndexName> explicitly to match your assembly name so MSBuild has a valid value.

    Give that a try and let me know what the exception says, that will confirm whether we are on the right track.

    Was this answer helpful?

    1 person found this answer 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.