【发布时间】:2016-03-18 23:00:52
【问题描述】:
在 Visual Studio 2015+SP1 中,XAML 设计器显示此错误:
System.IO.FileNotFoundException
The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.MetadataReader.NativeMethods.SafeOpenFile(String fileName)
at Microsoft.MetadataReader.FileMapping..ctor(String fileName)
at Microsoft.MetadataReader.MetadataDispenser.OpenFileAsFileMapping(String fileName)
at Microsoft.MetadataReader.Loader.ResolveModule(Assembly containingAssembly, String moduleName)
at Microsoft.MetadataReader.DefaultUniverse.ResolveModule(Assembly containingAssembly, String moduleName)
at Microsoft.MetadataReader.SimpleUniverse.Microsoft.MetadataReader.ITypeUniverse.ResolveModule(Assembly containingAssembly, String moduleName)
...
这是截图:
更新
查看 Microsoft 修复此错误的建议,请参阅 Debugging or Disabling Project Code in XAML Designer。
【问题讨论】:
-
始终或仅在您打开特定项目/xaml 文件时?
-
刚刚使用全新的 WPF 应用程序对其进行了测试,并且运行良好。所以它一定和我正在做的项目有关。
标签: wpf xaml visual-studio-2015