Image Visual Studio 2012-Xaml中的新古玩错误

Image Visual Studio 2012-Xaml中的新古玩错误,image,xaml,.net-4.0,visual-studio-2012,uri,Image,Xaml,.net 4.0,Visual Studio 2012,Uri,我将Visual Studio 2012与.NET 4.0(C#)一起使用。 现在,我在Xaml中添加了一个图像: <Image Source="/PPPos.Common.Images;component/Application/Pos.jpg" Stretch="Fill" /> Image Pos.jpg作为资源包含在引用的程序集PPPos.Common.Images.DLL中 Visual Studio 2012现在为我提供了错误列表中的休闲异常: 错误2找不到路径的一

我将Visual Studio 2012与.NET 4.0(C#)一起使用。 现在,我在Xaml中添加了一个图像:

<Image Source="/PPPos.Common.Images;component/Application/Pos.jpg" Stretch="Fill" />

Image Pos.jpg作为资源包含在引用的程序集PPPos.Common.Images.DLL中

Visual Studio 2012现在为我提供了错误列表中的休闲异常:

错误2找不到路径的一部分 'C:\PPPos.Common.Images;组件\应用程序\ Pos.jpg'

但是我可以毫无问题地编译源代码,并且在运行应用程序时会显示图像。 这也是Visual Studio 2012的新增功能-Visual Studio 2010的错误列表中没有错误消息


有人知道可能有什么问题吗?

经过长时间的搜索,我找到了解决方案

<Image Source="pack://application:,,,/PPPos.Common.Images;component/Application/Pos.jpg" Stretch="Fill" />

然而,我仍然不知道为什么VS2013会出现这种情况。
如有任何解释,我们将不胜感激。

如果您在源值前面加上“”pack://application:VS2012和VS2013中的、、、、。 但是我已经向VisualStudio团队报告了这个问题,因为与VS2010相比,它是一个新的坏特性,在VS2010中,您不必添加这个前缀。对于后台兼容性,VisualStudio团队应该修复它