Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual Studio 2012显示的xaml错误不是错误_Xaml_Visual Studio 2012 - Fatal编程技术网

Visual Studio 2012显示的xaml错误不是错误

Visual Studio 2012显示的xaml错误不是错误,xaml,visual-studio-2012,Xaml,Visual Studio 2012,例如,我对窗口执行以下操作: Icon="/Prayon.Common.Images;component/Application/Prayon.ico" 这非常有效,VisualStudio2010中没有错误。现在,在VisualStudio2012中,我看到了错误 Could not find a part of the path 'C:\Prayon.Common.Images;component\Application\Prayon.ico'. 在错误列表中。但是Prayon.ico位

例如,我对窗口执行以下操作:

Icon="/Prayon.Common.Images;component/Application/Prayon.ico"
这非常有效,VisualStudio2010中没有错误。现在,在VisualStudio2012中,我看到了错误

Could not find a part of the path 'C:\Prayon.Common.Images;component\Application\Prayon.ico'.
在错误列表中。但是
Prayon.ico
位于正确引用的程序集
Prayon.Common.Images

为什么Visual Studio 2012会将此报告为错误


我可以毫无问题地编译和运行这个项目。VS2012的错误列表中只有很多错误消息,这使得很难获得“真正的”错误。

我很确定您以一种有趣的方式引用了该图像, 不应该更像这样吗

pack://application:,,,/Resources/Prayon.png"
或者更准确地说是这个

<Image Source="/ClassLibraryName;Component/images/myimage.png"/> 

您可以在此处找到有关WPF包URI的更多信息: