zoukankan      html  css  js  c++  java
  • VS2012在安装更新包后不能创建与打开项目

    在安装目录“C:UsersAdministratorAppDataRoamingMicrosoftVisualStudio11.0ActivityLog.xml”-->VS的活动log中记录的错误信息是

    “Construction of frame content failed.
Frame identifier: ST:0:0:{28836128-fc2c-11d2-a433-00c04f72d18a}
Frame caption: 命令窗口
Exception details:
System.ComponentModel.Composition.ImportCardinalityMismatchException: 未找到与约束 
	ContractName	Microsoft.VisualStudio.Utilities.IContentTypeRegistryService
	RequiredTypeIdentity	Microsoft.VisualStudio.Utilities.IContentTypeRegistryService 匹配的导出
   在 System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition)
   在 System.ComponentModel.Composition.Hosting.ExportProvider.GetExportsCore(Type type, Type metadataViewType, String contractName, ImportCardinality cardinality)
   在 System.ComponentModel.Composition.Hosting.ExportProvider.GetExportedValueCore[T](String contractName, ImportCardinality cardinality)
   在 System.ComponentModel.Composition.Hosting.ExportProvider.GetExportedValue[T](String contractName)
   在 System.ComponentModel.Composition.Hosting.ExportProvider.GetExportedValue[T]()
   在 Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetService[T]()
   在 Microsoft.VisualStudio.Editor.Implementation.EditorParts.get_ContentTypeRegistryService()
   在 Microsoft.VisualStudio.Editor.Implementation.LanguageServiceToContentTypeMapper.MakeLanguageServiceContentTypes(SettingsStore settingsStore)
   在 Microsoft.VisualStudio.Editor.Implementation.LanguageServiceToContentTypeMapper.InitLanguageServiceToContentTypeMapper(IServiceProvider serviceProvider, IComponentModel componentModel)
   在 Microsoft.VisualStudio.Editor.Implementation.VsDocDataAdapter.SetSite(Object pUnkSite)
   在 Microsoft.VisualStudio.Editor.Implementation.VsTextBufferAdapter.SetSite(Object pUnkSite)
   在 System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   在 Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConstructContent()”

    在网上找到了一些解决方法,其中一种是:

    卸载两个补丁:KB2833957和KB2840642,但我的电脑只有KB2833957,没有找到KB2840642,找到了KB2840642(v2), 当我把这两个补丁卸载后,重启电脑,仍然不能正常打开VS2012

    第二种方法:

    安装补丁KB2781514,这个补丁是主要解决在 .NET Framework 4.5 更新之后,Visual Studio 用户可能无法打开或创建 C++ 或 JavaScript 文件或项目。

    在安装完补丁KB2781514后,VS2012可以正常创建或打开项目工程了。

    还是第二种方法直接一些。

  • 相关阅读:
    TreeSelect组件:vmodel语法糖进行父子组件传值案例
    带 icon 的输入框:slot方式。slot="prefix"和slot="suffix"
    双向绑定vmodel与单向绑定vbind:value
    使用Set集合对List集合去重
    前端报错: error in ./src/assets/fonts/iconfont.svg?t=1523541245904,Module parse failed: Unexpected token (1:0),vue.config.js中引入chainWebpack后报错
    当主键不是id时,而是其他字段,那么该字段要加上@Id注解(除了表中指定主键,实体类中也要用@Id指定主键)
    java将文件转为base64字符串和将base64字符串转为文件
    父组件向子组件传递getList方法:provide/inject
    带卡片的input输入框
    C#中使用#if DEBUG
  • 原文地址:https://www.cnblogs.com/longay/p/3660621.html
Copyright © 2011-2022 走看看