上次我打开 Windows 应用商店应用程序时(昨晚),其中出现了 XAML 错误。我(试图)今晚打开它以尝试修复它,但出现了关于无法加载的各种错误。以下是 ActivityLog.xml 文件的重要摘录:
460 2014/12/25 01:39:17.198 错误 VisualStudio SetSite 包 [LocalHistoryPackage] {3A6E8827-8C64-42EC-B83A-9CA32DA7BBF5} 失败
80131500 未找到与约束匹配的导出:ContractName Microsoft.VisualStudio.Text.ITextDocumentFactoryService RequiredTypeIdentity Microsoft.VisualStudio.Text.ITextDocumentFactoryService
. . .
935 2014/12/25 01:43:39.091 错误 VisualStudio SetSite 包 [LocalHistoryPackage] {3A6E8827-8C64-42EC-B83A-9CA32DA7BBF5} 失败
80131500 未找到与约束匹配的导出:ContractName
Microsoft.VisualStudio.Text.ITextDocumentFactoryService RequiredTypeIdentity
Microsoft.VisualStudio.Text.ITextDocumentFactoryService
. . .
937 2014/12/25 01:43:39.092 警告 VisualStudio 包加载失败;跳过标志 {3A6E8827-8C64-42EC-B83A-9CA32DA7BBF5} 抑制的错误消息
. . .
966 2014/12/25 01:43:52.147 错误 VisualStudio SetSite 包 [Microsoft.VisualStudio.Editor.Implementation.EditorPackage] {E269B994-EF71-4CE0-8BCD-581C217372E8} 失败
80131500 未找到与约束匹配的导出:ContractName
Microsoft.VisualStudio.Utilities.IContentTypeRegistryService RequiredTypeIdentity
Microsoft.VisualStudio.Utilities.IContentTypeRegistryService
我关闭了 VS,重新打开它和项目,虽然我没有看到所有这些错误消息,并且项目表面上是打开的,但解决方案资源管理器中没有任何内容(没有显示文件)。我尝试通过文件 > 打开打开 MainPage,但这只是导致另一个错误消息。
上次打开项目时唯一改变的另一件事是我将 SQLite 从版本 3.8.7.1 更新到 3.8.7.2
解决方案可能是什么(没有双关语)?
更新
在尝试关闭 Visual Studio 时,我一遍又一遍:“没有找到与约束匹配的导出...(bla bla bla)”,直到我不得不通过 Ctrl+Alt+Del 停止它
更新 2
更奇怪的是:我可以打开项目,尽管解决方案资源管理器完全为空/没有文件
可见,如果我通过 Ctrl+Shift+B 构建项目,它确实会给我错误列表中的错误(MainPage.xaml 中的 XAML 错误)。
但是,单击 2 次它们不会在编辑器中显示任何内容。
如果我尝试打开 MainPage.xaml,我会得到:
但是,虽然我刚刚保存了这个文件(上面的屏幕截图),但上面的日期是 2014 年 10 月 19 日 - 两个多月前。什么……?!?
我必须做些什么才能让它恢复正常?
更新 3
我确实在 Team Explorer 选项卡打开的情况下看到了这一点(此应用不受版本控制):
Page '3185ed96-1cbd-4381-a439-636973542e50' not found.
我通过在 Notepad ++ 中打开 MainPage.xaml 并更改 XAML 来修复 XAML 问题。然后我能够在 Visual Studio 中成功构建应用程序,但尝试运行应用程序导致 VS 崩溃然后再次启动(解决方案资源管理器中仍然没有文件)。
更新 4
现在,当我尝试通过 File > Open in VS 2013 打开 MainPage.xaml 时,我得到“Package Designer Package failed to load”...
更新 5
现在我可以运行应用程序(有点);F5 会导致启动屏幕显示,然后它只是变成灰黑色。当我 Alt+F4 关闭它时,VS 再次启动(显然在关闭之后 - 我打算只关闭我正在运行的应用程序,而不是 Visual Studio。
AutoHistory 告诉我:
An exception was encountered while constructing the content of this frame. This information is also logged in "C:\Users\Clay\AppData\Roaming\Microsoft\VisualStudio\12.0\ActivityLog.xml".
Exception details:
System.Exception: Exception of type 'System.Exception' was thrown.
at Microsoft.VisualStudio.Shell.Interop.IVsShell5.LoadPackageWithContext(Guid& packageGuid, Int32 reason, Guid&
context)
at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.GetPackage()
at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConstructContent()
无论如何,然后我注意到我确实有一个(字面)红旗,并且将它捣碎会向我显示“更新您的开发人员许可证”消息。
我能够更新我的开发许可证,但我的解决方案仍然像以前一样古怪。
更新 6
回答 Walt Ritscher,我在启动 VS 时在 AutoHistory 中得到了这个(没有打开解决方案):
构造此框架的内容时遇到异常。此信息也记录在“C:\Users\Clay\AppData\Roaming\Microsoft\VisualStudio\12.0\ActivityLog.xml”中。
Exception details:
System.Exception: Exception of type 'System.Exception' was thrown.
at Microsoft.VisualStudio.Shell.Interop.IVsShell5.LoadPackageWithContext(Guid& packageGuid, Int32 reason, Guid& context)
at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.GetPackage()
at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConstructContent()
然后,当我上次打开另一个运行良好的项目时,它也没有在解决方案资源管理器中显示任何文件。如果我尝试运行它,我会得到相同的“未找到导出”错误消息。
所以 VS 本身似乎很糟糕。我需要做什么?卸载/重新安装?