Visual Studio 2012在构建时崩溃

道格

当构建特定的应用程序而不是其他应用程序时,Visual Studio崩溃。我使用几种解决方案都没有问题,但是当我尝试使用该特定解决方案时,VS崩溃并在尝试构建它时关闭。

相同的解决方案可在其他人的机器上使用。

我该如何解决?

该应用程序是使用Entity Framework的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()
道格

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

我卸载了它,然后构建了它。

更新:

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

看来所有这些混乱都是由Entity Framework CTP 2011年7月引起的,该版本已安装在我的计算机中。该问题不是由EF设计人员引起的,而是由被多个版本的EF程序集混淆的系统引起的。

混合使用EF版本会导致其他一些问题,而尝试删除它会导致更多问题。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章