Pack URI not in the right format

RogerSchlueter-7899 1,176 Reputation points
2023-03-23T15:33:58.5+00:00

I have a ResourceDictionary in a file that I want to incorporate in my applications but I cannot get the pack uri to work.

Here is my Application XAML:

<Application
    ....
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://siteoforigin:,,,c:\ProgramData\MyApps\BaseResources.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>

At compile time This gives an error:

The URI prefix is not recognized.

Since the pack is exactly like what is shown in the Pack URI documentation, I don't know what is causing the error.

XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
760 questions
0 comments No comments
{count} votes