C# 无法从另一个程序集加载资源映像

C# 无法从另一个程序集加载资源映像,c#,wpf,C#,Wpf,案例 我有两个程序集:一个保存应用程序,一个充当库。 该库保存图像资源,例如:“Images/image.png”,其构建操作设置为resource 库 除此之外,库还包含一个SomeStyle.xaml文件: <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.c

案例

我有两个程序集:一个保存应用程序,一个充当库。 该库保存图像资源,例如:“Images/image.png”,其构建操作设置为resource

除此之外,库还包含一个SomeStyle.xaml文件:

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

     <Image x:Key="someKey" Source="/LibraryAssemblyHere;component/Images/image.png" />

</ResourceDictionary>
除了内部例外:

Cannot locate resource 'images/image.png'.
问题

简单:我做错了什么?我找了又找,但没有任何帮助


提前谢谢

如果库中有映像,那么资源文件中就不需要packURI语法,它也在library.Oke中。你知道吗。。。因为某种原因,这实际上修复了它。我认为pack语法只是一个较长的版本,应该指向相同的资源。显然不是。有人能解释一下吗?
Failed to create a 'ImageSource' from the text '/LibraryAssemblyHere;component/Images/image.png
Cannot locate resource 'images/image.png'.