Visual Studio 2012在生成时崩溃

本文关键字:崩溃 Studio 2012 Visual | 更新日期: 2023-09-27 18:00:15

My Visual Studio在构建特定应用程序时崩溃,但其他应用程序不会崩溃。我使用了几个没有问题的解决方案,但当我尝试使用这个特定的解决方案时,VS崩溃,每当我尝试构建它时就会关闭。

同样的解决方案也适用于其他人的机器。

我该怎么修?

该应用程序是一个使用实体框架的MVC web应用程序,如果它有任何不同的话。

我的操作系统是Windows 7 64位。

更新:

我发现了一些看起来与坠机有关的日志。

UNHANDLED EXCEPTIONS FROM PROCESS 11176:
=====================
24/04/2014 19:46:50
System.MissingMethodException: Method not found: 'System.Collections.ObjectModel.ReadOnlyCollection`1<System.Data.Metadata.Edm.PrimitiveType> System.Data.Metadata.Edm.EdmItemCollection.GetPrimitiveTypes(Double)'.
   at System.Data.Entity.Design.MetadataExtensionMethods.GetPrimitiveTypes(EdmItemCollection itemCollection, Version edmVersion)
   at Microsoft.Data.Entity.Design.Model.ModelHelper.AllPrimitiveTypes(Version targetFrameworkVersion)
   at Microsoft.Data.Entity.Design.Model.Entity.FunctionImport.get_IsReturnTypeComplexType()
   at Microsoft.Data.Entity.Design.Model.Entity.FunctionImport.get_ReturnType()
   at Microsoft.Data.Entity.Design.Model.Entity.FunctionImport.<get_Children>d__0.MoveNext()
   at Microsoft.Data.Entity.Design.Model.EFContainer.Dispose(Boolean disposing)
   at Microsoft.Data.Entity.Design.Model.EFNormalizableItem.Dispose(Boolean disposing)
   at Microsoft.Data.Entity.Design.Model.EFObject.Dispose()
   at Microsoft.Data.Entity.Design.Model.EFContainer.Dispose(Boolean disposing)
   at Microsoft.Data.Entity.Design.Model.EFNormalizableItem.Dispose(Boolean disposing)
   at Microsoft.Data.Entity.Design.Model.EFObject.Dispose()
   at Microsoft.Data.Entity.Design.Model.EFContainer.Dispose(Boolean disposing)
   at Microsoft.Data.Entity.Design.Model.EFNormalizableItem.Dispose(Boolean disposing)
   at Microsoft.Data.Entity.Design.Model.EFObject.Dispose()
   at Microsoft.Data.Entity.Design.Model.EntityDesignArtifact.Dispose(Boolean disposing)
   at Microsoft.Data.Entity.Design.VisualStudio.Model.VSArtifact.Dispose(Boolean disposing)
   at Microsoft.Data.Entity.Design.Model.EFObject.Dispose()
   at Microsoft.Data.Entity.Design.Model.ModelManager.Dispose(Boolean disposing)
   at Microsoft.Data.Entity.Design.VisualStudio.VisualStudioEdmxValidator.Finalize()

Visual Studio 2012在生成时崩溃

尝试删除bin和obj文件->重建项目

我注意到我的机器在Windows安装程序列表中有一个名为Entity Framework Designer for Visual Studio 2012的项目,但我的同事都并没有

我卸载了它,然后它生成了。

更新:

很明显,当我卸载设计器时,我失去了编辑实体模型的能力。现在Visual Studio将其作为XML打开。不好。

看起来所有这些混乱都是由2011年7月安装在我的机器中的实体框架CTP引起的。问题不是由EF设计器引起的,而是由多个版本的EF程序集混淆了系统引起的。

EF版本的混合造成了一些其他问题,试图删除它也造成了更多问题。