Visual Studio 2015 Update 2 Professional 在 Schema Compare 上崩溃
Visual Studio 2015 Update 2 Professional Crashes on Schema Compare
我在解决方案中有一个 SQL 服务器项目。我直接在 SQL Server Management Studio 中对数据库进行了一些更新,我想更新 Visual Studio 中的 SQL 服务器项目以匹配数据库的架构。在Visual Studio中,当我select"Compare Schema"选择数据库作为源,项目目录作为目标,然后点击"Compare",比较的结果显示在屏幕,但随后 Visual Studio 立即崩溃。我是 运行 Visual Studio 2015 Professional,安装了 Update 2,我有 Microsoft SQL Server Data Tools 2015。以下详细信息显示在事件查看器中:
Application: devenv.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: Microsoft.VisualStudio.Composition.CompositionFailedException
at Microsoft.VisualStudio.Composition.ExportProvider.GetExports(Microsoft.VisualStudio.Composition.ImportDefinition)
at Microsoft.VisualStudio.Composition.ExportProvider.GetExports[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.String, Microsoft.VisualStudio.Composition.ImportCardinality)
at Microsoft.VisualStudio.Composition.ExportProvider.GetExport[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.String)
at Microsoft.VisualStudio.Composition.ExportProvider.GetExport[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.String)
at Microsoft.VisualStudio.Composition.ExportProvider.GetExport[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]()
at Microsoft.VisualStudio.Composition.ExportProvider.GetExportedValue[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]()
at Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetService[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]()
at Microsoft.VisualStudio.Data.Tools.Package.SchemaCompare.UI.ComparisonControl.SetSourceAndTargetScripts(System.String, System.String, System.Collections.Generic.IDictionary`2<System.Object,System.Object>, System.Collections.Generic.IDictionary`2<System.Object,System.Object>)
at Microsoft.VisualStudio.Data.Tools.Package.SchemaCompare.UI.ComparisonControl.ClearText()
at Microsoft.VisualStudio.Data.Tools.Package.SchemaCompare2.UI.SchemaCompareEditorControl.PopulateMainGrid(Boolean)
at Microsoft.VisualStudio.Data.Tools.Package.SchemaCompare2.UI.SchemaCompareEditorControl+<>c__DisplayClass44_0.<HandleModelCompareCompleted>b__0()
at Microsoft.VisualStudio.Shell.InvokableAction.InvokeMethod()
at Microsoft.VisualStudio.Shell.InvokableBase.Invoke() Exception Info: Microsoft.VisualStudio.Composition.CompositionFailedException
at Microsoft.VisualStudio.Shell.ThreadHelper.InvokeOnUIThread(Microsoft.VisualStudio.Shell.InvokableBase)
at Microsoft.VisualStudio.Shell.ThreadHelper.Invoke(System.Action)
at Microsoft.VisualStudio.Data.Tools.Package.SchemaCompare2.UI.SchemaCompareEditorControl.HandleModelCompareCompleted(System.Object, Microsoft.Data.Tools.Schema.Utilities.Sql.SchemaCompare.DataModel.OperationEventArgs)
at System.EventHandler`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Invoke(System.Object, System.__Canon)
at Microsoft.Data.Tools.Schema.Utilities.Sql.SchemaCompare.DataModel.SchemaCompareDataModel.RaiseEvent[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.EventHandler`1<System.__Canon>, System.__Canon)
at Microsoft.Data.Tools.Schema.Utilities.Sql.SchemaCompare.DataModel.SchemaCompareDataModel.Compare()
at Microsoft.Data.Tools.Schema.Utilities.Sql.SchemaCompare.DataModel.SchemaCompareDataModel.<CompareAsync>b__184_0()
at Microsoft.Data.Tools.Schema.Utilities.Sql.SchemaCompare.DataModel.SchemaCompareDataModel+<>c__DisplayClass204_0.<RunAsync>b__0(System.Object)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
尝试清除 Visual Studio
中的缓存:
C:\Users\[user]\AppData\Local\Microsoft\VisualStudio.0\ComponentModelCache
删除此目录中的所有内容,然后重新启动 Visual Studio。
我在解决方案中有一个 SQL 服务器项目。我直接在 SQL Server Management Studio 中对数据库进行了一些更新,我想更新 Visual Studio 中的 SQL 服务器项目以匹配数据库的架构。在Visual Studio中,当我select"Compare Schema"选择数据库作为源,项目目录作为目标,然后点击"Compare",比较的结果显示在屏幕,但随后 Visual Studio 立即崩溃。我是 运行 Visual Studio 2015 Professional,安装了 Update 2,我有 Microsoft SQL Server Data Tools 2015。以下详细信息显示在事件查看器中:
Application: devenv.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: Microsoft.VisualStudio.Composition.CompositionFailedException
at Microsoft.VisualStudio.Composition.ExportProvider.GetExports(Microsoft.VisualStudio.Composition.ImportDefinition)
at Microsoft.VisualStudio.Composition.ExportProvider.GetExports[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.String, Microsoft.VisualStudio.Composition.ImportCardinality)
at Microsoft.VisualStudio.Composition.ExportProvider.GetExport[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.String)
at Microsoft.VisualStudio.Composition.ExportProvider.GetExport[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.String)
at Microsoft.VisualStudio.Composition.ExportProvider.GetExport[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]()
at Microsoft.VisualStudio.Composition.ExportProvider.GetExportedValue[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]()
at Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetService[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]()
at Microsoft.VisualStudio.Data.Tools.Package.SchemaCompare.UI.ComparisonControl.SetSourceAndTargetScripts(System.String, System.String, System.Collections.Generic.IDictionary`2<System.Object,System.Object>, System.Collections.Generic.IDictionary`2<System.Object,System.Object>)
at Microsoft.VisualStudio.Data.Tools.Package.SchemaCompare.UI.ComparisonControl.ClearText()
at Microsoft.VisualStudio.Data.Tools.Package.SchemaCompare2.UI.SchemaCompareEditorControl.PopulateMainGrid(Boolean)
at Microsoft.VisualStudio.Data.Tools.Package.SchemaCompare2.UI.SchemaCompareEditorControl+<>c__DisplayClass44_0.<HandleModelCompareCompleted>b__0()
at Microsoft.VisualStudio.Shell.InvokableAction.InvokeMethod()
at Microsoft.VisualStudio.Shell.InvokableBase.Invoke() Exception Info: Microsoft.VisualStudio.Composition.CompositionFailedException
at Microsoft.VisualStudio.Shell.ThreadHelper.InvokeOnUIThread(Microsoft.VisualStudio.Shell.InvokableBase)
at Microsoft.VisualStudio.Shell.ThreadHelper.Invoke(System.Action)
at Microsoft.VisualStudio.Data.Tools.Package.SchemaCompare2.UI.SchemaCompareEditorControl.HandleModelCompareCompleted(System.Object, Microsoft.Data.Tools.Schema.Utilities.Sql.SchemaCompare.DataModel.OperationEventArgs)
at System.EventHandler`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Invoke(System.Object, System.__Canon)
at Microsoft.Data.Tools.Schema.Utilities.Sql.SchemaCompare.DataModel.SchemaCompareDataModel.RaiseEvent[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.EventHandler`1<System.__Canon>, System.__Canon)
at Microsoft.Data.Tools.Schema.Utilities.Sql.SchemaCompare.DataModel.SchemaCompareDataModel.Compare()
at Microsoft.Data.Tools.Schema.Utilities.Sql.SchemaCompare.DataModel.SchemaCompareDataModel.<CompareAsync>b__184_0()
at Microsoft.Data.Tools.Schema.Utilities.Sql.SchemaCompare.DataModel.SchemaCompareDataModel+<>c__DisplayClass204_0.<RunAsync>b__0(System.Object)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
尝试清除 Visual Studio
中的缓存:
C:\Users\[user]\AppData\Local\Microsoft\VisualStudio.0\ComponentModelCache
删除此目录中的所有内容,然后重新启动 Visual Studio。